diff --git a/clickhouse/changelog.d/16957.added b/clickhouse/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/clickhouse/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/clickhouse/datadog_checks/clickhouse/config_models/instance.py b/clickhouse/datadog_checks/clickhouse/config_models/instance.py index 494dd01b5c536..608dbcde1f6be 100644 --- a/clickhouse/datadog_checks/clickhouse/config_models/instance.py +++ b/clickhouse/datadog_checks/clickhouse/config_models/instance.py @@ -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 diff --git a/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example b/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example index e34165e4ba96a..79c29ee0c7701 100644 --- a/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example +++ b/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example @@ -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 diff --git a/datadog_checks_dev/changelog.d/16957.added b/datadog_checks_dev/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/datadog_checks_dev/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/init_config/db.yaml b/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/init_config/db.yaml index 433aa592516d3..5b4b91f5dc545 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/init_config/db.yaml +++ b/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/init_config/db.yaml @@ -13,3 +13,4 @@ - query: columns: tags: + collection_interval: diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/instances/db.yaml b/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/instances/db.yaml index 3a3fa548930f2..ef690c09c8049 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/instances/db.yaml +++ b/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/instances/db.yaml @@ -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: @@ -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: @@ -83,3 +92,4 @@ type: gauge tags: - test: + collection_interval: 30 diff --git a/mysql/changelog.d/16957.added b/mysql/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/mysql/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/mysql/datadog_checks/mysql/config_models/instance.py b/mysql/datadog_checks/mysql/config_models/instance.py index 9a644cb80b619..8104acc8a065a 100644 --- a/mysql/datadog_checks/mysql/config_models/instance.py +++ b/mysql/datadog_checks/mysql/config_models/instance.py @@ -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 diff --git a/mysql/datadog_checks/mysql/data/conf.yaml.example b/mysql/datadog_checks/mysql/data/conf.yaml.example index ebbe33c56da5d..f13b13f07728f 100644 --- a/mysql/datadog_checks/mysql/data/conf.yaml.example +++ b/mysql/datadog_checks/mysql/data/conf.yaml.example @@ -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 diff --git a/oracle/changelog.d/16957.added b/oracle/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/oracle/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/oracle/datadog_checks/oracle/config_models/instance.py b/oracle/datadog_checks/oracle/config_models/instance.py index cd241fe79ae46..2b679996b299b 100644 --- a/oracle/datadog_checks/oracle/config_models/instance.py +++ b/oracle/datadog_checks/oracle/config_models/instance.py @@ -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 diff --git a/oracle/datadog_checks/oracle/data/conf.yaml.example b/oracle/datadog_checks/oracle/data/conf.yaml.example index 679df53073be4..b66dedc067a5f 100644 --- a/oracle/datadog_checks/oracle/data/conf.yaml.example +++ b/oracle/datadog_checks/oracle/data/conf.yaml.example @@ -18,6 +18,7 @@ init_config: # - query: # columns: # tags: + # collection_interval: ## @param service - string - optional ## Attach the tag `service:` to every metric, event, and service check emitted by this integration. @@ -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 @@ -155,6 +163,7 @@ instances: # type: gauge # tags: # - test: + # 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. diff --git a/sap_hana/changelog.d/16957.added b/sap_hana/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/sap_hana/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/sap_hana/datadog_checks/sap_hana/config_models/instance.py b/sap_hana/datadog_checks/sap_hana/config_models/instance.py index 82c51f6b0606a..55c303564c526 100644 --- a/sap_hana/datadog_checks/sap_hana/config_models/instance.py +++ b/sap_hana/datadog_checks/sap_hana/config_models/instance.py @@ -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 diff --git a/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example b/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example index e01771388e5a6..9d795b07175aa 100644 --- a/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example +++ b/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example @@ -17,6 +17,7 @@ init_config: # - query: # columns: # tags: + # collection_interval: ## @param service - string - optional ## Attach the tag `service:` to every metric, event, and service check emitted by this integration. @@ -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 @@ -147,6 +155,7 @@ instances: # type: gauge # tags: # - test: + # collection_interval: 30 ## @param persist_db_connections - boolean - optional - default: true ## Whether or not to persist database connections. diff --git a/singlestore/changelog.d/16957.added b/singlestore/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/singlestore/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/singlestore/datadog_checks/singlestore/config_models/instance.py b/singlestore/datadog_checks/singlestore/config_models/instance.py index 4184b9bff32b3..9717711652b1e 100644 --- a/singlestore/datadog_checks/singlestore/config_models/instance.py +++ b/singlestore/datadog_checks/singlestore/config_models/instance.py @@ -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 diff --git a/singlestore/datadog_checks/singlestore/data/conf.yaml.example b/singlestore/datadog_checks/singlestore/data/conf.yaml.example index a9137b4b23a85..be1cb92a138b7 100644 --- a/singlestore/datadog_checks/singlestore/data/conf.yaml.example +++ b/singlestore/datadog_checks/singlestore/data/conf.yaml.example @@ -19,6 +19,7 @@ init_config: # - query: # columns: # tags: + # collection_interval: ## Every instance is scheduled independently of the others. # @@ -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 @@ -122,6 +130,7 @@ instances: # type: gauge # tags: # - test: + # 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 diff --git a/snowflake/changelog.d/16957.added b/snowflake/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/snowflake/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/snowflake/datadog_checks/snowflake/config_models/instance.py b/snowflake/datadog_checks/snowflake/config_models/instance.py index 2b8ac9c129eb8..92726997cc175 100644 --- a/snowflake/datadog_checks/snowflake/config_models/instance.py +++ b/snowflake/datadog_checks/snowflake/config_models/instance.py @@ -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 diff --git a/snowflake/datadog_checks/snowflake/data/conf.yaml.example b/snowflake/datadog_checks/snowflake/data/conf.yaml.example index 3dc41ac9bd982..d31a8c4151786 100644 --- a/snowflake/datadog_checks/snowflake/data/conf.yaml.example +++ b/snowflake/datadog_checks/snowflake/data/conf.yaml.example @@ -12,6 +12,7 @@ init_config: # - query: # columns: # tags: + # collection_interval: ## @param proxy_host - string - optional ## The host of your proxy server. @@ -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 diff --git a/sqlserver/changelog.d/16957.added b/sqlserver/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/sqlserver/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/sqlserver/datadog_checks/sqlserver/config_models/instance.py b/sqlserver/datadog_checks/sqlserver/config_models/instance.py index 2fe97235a68c4..3f612426bb256 100644 --- a/sqlserver/datadog_checks/sqlserver/config_models/instance.py +++ b/sqlserver/datadog_checks/sqlserver/config_models/instance.py @@ -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 diff --git a/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example b/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example index cbfb5f2489d1e..c5a6390c6cd39 100644 --- a/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example +++ b/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example @@ -22,6 +22,7 @@ init_config: # - query: # columns: # tags: + # collection_interval: ## @param service - string - optional ## Attach the tag `service:` to every metric, event, and service check emitted by this integration. @@ -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 @@ -603,6 +611,7 @@ instances: # type: gauge # tags: # - test: + # collection_interval: 30 ## @param stored_procedure - string - optional ## DEPRECATED - use `custom_queries` instead. For guidance, see: diff --git a/teradata/changelog.d/16957.added b/teradata/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/teradata/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/teradata/datadog_checks/teradata/config_models/instance.py b/teradata/datadog_checks/teradata/config_models/instance.py index 8012d8c92a1c5..38cfd5f186465 100644 --- a/teradata/datadog_checks/teradata/config_models/instance.py +++ b/teradata/datadog_checks/teradata/config_models/instance.py @@ -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 diff --git a/teradata/datadog_checks/teradata/data/conf.yaml.example b/teradata/datadog_checks/teradata/data/conf.yaml.example index 158b0bb2d800a..cf07f25f31f89 100644 --- a/teradata/datadog_checks/teradata/data/conf.yaml.example +++ b/teradata/datadog_checks/teradata/data/conf.yaml.example @@ -19,6 +19,7 @@ init_config: # - query: # columns: # tags: + # collection_interval: ## Every instance is scheduled independently of the others. # @@ -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 @@ -209,6 +217,7 @@ instances: # type: gauge # tags: # - test: + # 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. diff --git a/vertica/changelog.d/16957.added b/vertica/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/vertica/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/vertica/datadog_checks/vertica/config_models/instance.py b/vertica/datadog_checks/vertica/config_models/instance.py index 2baac499009d7..0cd30978ee63a 100644 --- a/vertica/datadog_checks/vertica/config_models/instance.py +++ b/vertica/datadog_checks/vertica/config_models/instance.py @@ -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 diff --git a/vertica/datadog_checks/vertica/data/conf.yaml.example b/vertica/datadog_checks/vertica/data/conf.yaml.example index 1d86c1ebe7605..9a4e31db6df78 100644 --- a/vertica/datadog_checks/vertica/data/conf.yaml.example +++ b/vertica/datadog_checks/vertica/data/conf.yaml.example @@ -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 diff --git a/voltdb/changelog.d/16957.added b/voltdb/changelog.d/16957.added new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/voltdb/changelog.d/16957.added @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval diff --git a/voltdb/datadog_checks/voltdb/config_models/instance.py b/voltdb/datadog_checks/voltdb/config_models/instance.py index 3f9bff6b68320..0f45304a34dc8 100644 --- a/voltdb/datadog_checks/voltdb/config_models/instance.py +++ b/voltdb/datadog_checks/voltdb/config_models/instance.py @@ -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 diff --git a/voltdb/datadog_checks/voltdb/data/conf.yaml.example b/voltdb/datadog_checks/voltdb/data/conf.yaml.example index afbc31b7a2084..1699fec73915a 100644 --- a/voltdb/datadog_checks/voltdb/data/conf.yaml.example +++ b/voltdb/datadog_checks/voltdb/data/conf.yaml.example @@ -44,6 +44,7 @@ init_config: # - query: # columns: # tags: + # collection_interval: ## @param service - string - optional ## Attach the tag `service:` to every metric, event, and service check emitted by this integration. @@ -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 @@ -319,6 +327,7 @@ instances: # type: gauge # tags: # - test: + # 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.