Skip to content

Commit

Permalink
update custom_queries configuration to support optional collection_in…
Browse files Browse the repository at this point in the history
…terval (#16957)

* update custom_queries configuration to support optional collection_interval

* add changelog

* update config

* sync config

* sync models

* update collection_interval description

* remove duplicate changelog
  • Loading branch information
lu-zhengda authored and NouemanKHAL committed Mar 4, 2024
1 parent 413ed58 commit fd568f8
Show file tree
Hide file tree
Showing 33 changed files with 115 additions and 0 deletions.
1 change: 1 addition & 0 deletions clickhouse/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
7 changes: 7 additions & 0 deletions clickhouse/datadog_checks/clickhouse/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand Down
1 change: 1 addition & 0 deletions datadog_checks_dev/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
- query: <QUERY>
columns: <COLUMNS>
tags: <TAGS>
collection_interval: <COLLECTION_INTERVAL>
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
Columns without a name are ignored. To skip a column, enter:
- {}
3. tags (optional) - A list of tags to apply to each metric.
4. collection_interval (optional) - The frequency at which to collect the metrics.
If collection_interval is not set, the query will be run every check run.
If the collection interval is less than check collection interval,
the query will be run every check run.
If the collection interval is greater than check collection interval,
the query will NOT BE RUN exactly at the collection interval.
The query will be run at the next check run after the collection interval has passed.
value:
type: array
items:
Expand All @@ -74,6 +81,8 @@
type: array
items:
type: string
- name: collection_interval
type: integer
example:
- query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
columns:
Expand All @@ -83,3 +92,4 @@
type: gauge
tags:
- test:<INTEGRATION>
collection_interval: 30
1 change: 1 addition & 0 deletions mysql/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions mysql/datadog_checks/mysql/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
7 changes: 7 additions & 0 deletions mysql/datadog_checks/mysql/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand Down
1 change: 1 addition & 0 deletions oracle/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions oracle/datadog_checks/oracle/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions oracle/datadog_checks/oracle/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## @param service - string - optional
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
Expand Down Expand Up @@ -145,6 +146,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -155,6 +163,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param tags - list of strings - optional
## A list of tags to attach to every metric and service check emitted by this instance.
Expand Down
1 change: 1 addition & 0 deletions sap_hana/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions sap_hana/datadog_checks/sap_hana/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions sap_hana/datadog_checks/sap_hana/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## @param service - string - optional
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
Expand Down Expand Up @@ -137,6 +138,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -147,6 +155,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param persist_db_connections - boolean - optional - default: true
## Whether or not to persist database connections.
Expand Down
1 change: 1 addition & 0 deletions singlestore/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions singlestore/datadog_checks/singlestore/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## Every instance is scheduled independently of the others.
#
Expand Down Expand Up @@ -112,6 +113,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -122,6 +130,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param collect_system_metrics - boolean - optional - default: false
## Collect additional system metrics from the MV_SYSINFO_* tables. Disabled by default to limit
Expand Down
1 change: 1 addition & 0 deletions snowflake/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
8 changes: 8 additions & 0 deletions snowflake/datadog_checks/snowflake/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## @param proxy_host - string - optional
## The host of your proxy server.
Expand Down Expand Up @@ -245,6 +246,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand Down
1 change: 1 addition & 0 deletions sqlserver/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions sqlserver/datadog_checks/sqlserver/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## @param service - string - optional
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
Expand Down Expand Up @@ -593,6 +594,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -603,6 +611,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param stored_procedure - string - optional
## DEPRECATED - use `custom_queries` instead. For guidance, see:
Expand Down
1 change: 1 addition & 0 deletions teradata/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions teradata/datadog_checks/teradata/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions teradata/datadog_checks/teradata/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## Every instance is scheduled independently of the others.
#
Expand Down Expand Up @@ -199,6 +200,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -209,6 +217,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param tags - list of strings - optional
## A list of tags to attach to every metric and service check emitted by this instance.
Expand Down
1 change: 1 addition & 0 deletions vertica/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions vertica/datadog_checks/vertica/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
7 changes: 7 additions & 0 deletions vertica/datadog_checks/vertica/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT force_outer, table_name FROM v_catalog.tables
Expand Down
1 change: 1 addition & 0 deletions voltdb/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions voltdb/datadog_checks/voltdb/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions voltdb/datadog_checks/voltdb/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## @param service - string - optional
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
Expand Down Expand Up @@ -309,6 +310,13 @@ instances:
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -319,6 +327,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param tags - list of strings - optional
## A list of tags to attach to every metric and service check emitted by this instance.
Expand Down

0 comments on commit fd568f8

Please sign in to comment.