From ca02f3b81f7e59e44d6a9e99e151ee074fffc4a8 Mon Sep 17 00:00:00 2001 From: Zhengda Lu Date: Fri, 23 Feb 2024 18:39:48 +0000 Subject: [PATCH 1/7] update custom_queries configuration to support optional collection_interval --- .../dev/tooling/templates/configuration/init_config/db.yaml | 1 + .../dev/tooling/templates/configuration/instances/db.yaml | 5 +++++ 2 files changed, 6 insertions(+) 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..db4773a3714e5 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,8 @@ 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. + The default is the integration's `min_collection_interval`. value: type: array items: @@ -74,6 +76,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 +87,4 @@ type: gauge tags: - test: + collection_interval: 30 From 4ed26357115430c5fec47a834658d8ebfc6e2f8d Mon Sep 17 00:00:00 2001 From: Zhengda Lu Date: Fri, 23 Feb 2024 18:45:00 +0000 Subject: [PATCH 2/7] add changelog --- datadog_checks_dev/changelog.d/16957.added | 1 + 1 file changed, 1 insertion(+) create mode 100644 datadog_checks_dev/changelog.d/16957.added 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 From 18f1451e6b730e0ca7b90f77676038a19588061d Mon Sep 17 00:00:00 2001 From: Zhengda Lu Date: Fri, 23 Feb 2024 18:48:55 +0000 Subject: [PATCH 3/7] update config --- .../dev/tooling/templates/configuration/instances/db.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 db4773a3714e5..0253e3b534d40 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 @@ -60,7 +60,7 @@ - {} 3. tags (optional) - A list of tags to apply to each metric. 4. collection_interval (optional) - The frequency at which to collect the metrics. - The default is the integration's `min_collection_interval`. + The default is the integration `min_collection_interval`. value: type: array items: From 7351d16441362d1f3b87d2ac414e389ea08242d7 Mon Sep 17 00:00:00 2001 From: Zhengda Lu Date: Fri, 23 Feb 2024 18:52:52 +0000 Subject: [PATCH 4/7] sync config --- clickhouse/changelog.d/16957.added | 1 + clickhouse/datadog_checks/clickhouse/data/conf.yaml.example | 2 ++ datadog_checks_dev/changelog.d/16957.added.1 | 1 + mysql/changelog.d/16957.added | 1 + mysql/datadog_checks/mysql/data/conf.yaml.example | 2 ++ oracle/changelog.d/16957.added | 1 + oracle/datadog_checks/oracle/data/conf.yaml.example | 4 ++++ sap_hana/changelog.d/16957.added | 1 + sap_hana/datadog_checks/sap_hana/data/conf.yaml.example | 4 ++++ singlestore/changelog.d/16957.added | 1 + singlestore/datadog_checks/singlestore/data/conf.yaml.example | 4 ++++ snowflake/changelog.d/16957.added | 1 + snowflake/datadog_checks/snowflake/data/conf.yaml.example | 3 +++ sqlserver/changelog.d/16957.added | 1 + sqlserver/datadog_checks/sqlserver/data/conf.yaml.example | 4 ++++ teradata/changelog.d/16957.added | 1 + teradata/datadog_checks/teradata/data/conf.yaml.example | 4 ++++ vertica/changelog.d/16957.added | 1 + vertica/datadog_checks/vertica/data/conf.yaml.example | 2 ++ voltdb/changelog.d/16957.added | 1 + voltdb/datadog_checks/voltdb/data/conf.yaml.example | 4 ++++ 21 files changed, 44 insertions(+) create mode 100644 clickhouse/changelog.d/16957.added create mode 100644 datadog_checks_dev/changelog.d/16957.added.1 create mode 100644 mysql/changelog.d/16957.added create mode 100644 oracle/changelog.d/16957.added create mode 100644 sap_hana/changelog.d/16957.added create mode 100644 singlestore/changelog.d/16957.added create mode 100644 snowflake/changelog.d/16957.added create mode 100644 sqlserver/changelog.d/16957.added create mode 100644 teradata/changelog.d/16957.added create mode 100644 vertica/changelog.d/16957.added create mode 100644 voltdb/changelog.d/16957.added 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/data/conf.yaml.example b/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example index e34165e4ba96a..ee3e6bbe8e5ac 100644 --- a/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example +++ b/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example @@ -132,6 +132,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo diff --git a/datadog_checks_dev/changelog.d/16957.added.1 b/datadog_checks_dev/changelog.d/16957.added.1 new file mode 100644 index 0000000000000..caf1a030fba34 --- /dev/null +++ b/datadog_checks_dev/changelog.d/16957.added.1 @@ -0,0 +1 @@ +update custom_queries configuration to support optional collection_interval 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/data/conf.yaml.example b/mysql/datadog_checks/mysql/data/conf.yaml.example index ebbe33c56da5d..02bdd78d336cd 100644 --- a/mysql/datadog_checks/mysql/data/conf.yaml.example +++ b/mysql/datadog_checks/mysql/data/conf.yaml.example @@ -148,6 +148,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # 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/data/conf.yaml.example b/oracle/datadog_checks/oracle/data/conf.yaml.example index 679df53073be4..96f32fc3fa920 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,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -155,6 +158,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/data/conf.yaml.example b/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example index e01771388e5a6..4aabfcfcc70cd 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,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -147,6 +150,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/data/conf.yaml.example b/singlestore/datadog_checks/singlestore/data/conf.yaml.example index a9137b4b23a85..9c95b64393f7c 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,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -122,6 +125,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/data/conf.yaml.example b/snowflake/datadog_checks/snowflake/data/conf.yaml.example index 3dc41ac9bd982..61058f85e80e7 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,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # 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/data/conf.yaml.example b/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example index cbfb5f2489d1e..b9157d691a40b 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,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -603,6 +606,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/data/conf.yaml.example b/teradata/datadog_checks/teradata/data/conf.yaml.example index 158b0bb2d800a..a47f4dbf1685d 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,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -209,6 +212,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/data/conf.yaml.example b/vertica/datadog_checks/vertica/data/conf.yaml.example index 1d86c1ebe7605..8e4ee971513fb 100644 --- a/vertica/datadog_checks/vertica/data/conf.yaml.example +++ b/vertica/datadog_checks/vertica/data/conf.yaml.example @@ -240,6 +240,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # 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/data/conf.yaml.example b/voltdb/datadog_checks/voltdb/data/conf.yaml.example index afbc31b7a2084..a8f02fb444038 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,8 @@ 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. + ## The default is the integration `min_collection_interval`. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -319,6 +322,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. From c23c8b1f7c2b9f64bede42c1b67ee39a4140ddd9 Mon Sep 17 00:00:00 2001 From: Zhengda Lu Date: Fri, 23 Feb 2024 18:56:01 +0000 Subject: [PATCH 5/7] sync models --- clickhouse/datadog_checks/clickhouse/config_models/instance.py | 1 + mysql/datadog_checks/mysql/config_models/instance.py | 1 + oracle/datadog_checks/oracle/config_models/instance.py | 1 + sap_hana/datadog_checks/sap_hana/config_models/instance.py | 1 + singlestore/datadog_checks/singlestore/config_models/instance.py | 1 + snowflake/datadog_checks/snowflake/config_models/instance.py | 1 + sqlserver/datadog_checks/sqlserver/config_models/instance.py | 1 + teradata/datadog_checks/teradata/config_models/instance.py | 1 + vertica/datadog_checks/vertica/config_models/instance.py | 1 + voltdb/datadog_checks/voltdb/config_models/instance.py | 1 + 10 files changed, 10 insertions(+) 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/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/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/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/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/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/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/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/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/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 From e0a117c307600b68fccf87bfd88b5d475428221c Mon Sep 17 00:00:00 2001 From: Zhengda Lu Date: Fri, 23 Feb 2024 23:28:56 +0000 Subject: [PATCH 6/7] update collection_interval description --- .../datadog_checks/clickhouse/data/conf.yaml.example | 7 ++++++- .../dev/tooling/templates/configuration/instances/db.yaml | 7 ++++++- mysql/datadog_checks/mysql/data/conf.yaml.example | 7 ++++++- oracle/datadog_checks/oracle/data/conf.yaml.example | 7 ++++++- sap_hana/datadog_checks/sap_hana/data/conf.yaml.example | 7 ++++++- .../datadog_checks/singlestore/data/conf.yaml.example | 7 ++++++- snowflake/datadog_checks/snowflake/data/conf.yaml.example | 7 ++++++- sqlserver/datadog_checks/sqlserver/data/conf.yaml.example | 7 ++++++- teradata/datadog_checks/teradata/data/conf.yaml.example | 7 ++++++- vertica/datadog_checks/vertica/data/conf.yaml.example | 7 ++++++- voltdb/datadog_checks/voltdb/data/conf.yaml.example | 7 ++++++- 11 files changed, 66 insertions(+), 11 deletions(-) diff --git a/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example b/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example index ee3e6bbe8e5ac..79c29ee0c7701 100644 --- a/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example +++ b/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example @@ -133,7 +133,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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/datadog_checks/dev/tooling/templates/configuration/instances/db.yaml b/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/instances/db.yaml index 0253e3b534d40..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 @@ -60,7 +60,12 @@ - {} 3. tags (optional) - A list of tags to apply to each metric. 4. collection_interval (optional) - The frequency at which to collect the metrics. - The default is the integration `min_collection_interval`. + 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: diff --git a/mysql/datadog_checks/mysql/data/conf.yaml.example b/mysql/datadog_checks/mysql/data/conf.yaml.example index 02bdd78d336cd..f13b13f07728f 100644 --- a/mysql/datadog_checks/mysql/data/conf.yaml.example +++ b/mysql/datadog_checks/mysql/data/conf.yaml.example @@ -149,7 +149,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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/datadog_checks/oracle/data/conf.yaml.example b/oracle/datadog_checks/oracle/data/conf.yaml.example index 96f32fc3fa920..b66dedc067a5f 100644 --- a/oracle/datadog_checks/oracle/data/conf.yaml.example +++ b/oracle/datadog_checks/oracle/data/conf.yaml.example @@ -147,7 +147,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example b/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example index 4aabfcfcc70cd..9d795b07175aa 100644 --- a/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example +++ b/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example @@ -139,7 +139,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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/singlestore/datadog_checks/singlestore/data/conf.yaml.example b/singlestore/datadog_checks/singlestore/data/conf.yaml.example index 9c95b64393f7c..be1cb92a138b7 100644 --- a/singlestore/datadog_checks/singlestore/data/conf.yaml.example +++ b/singlestore/datadog_checks/singlestore/data/conf.yaml.example @@ -114,7 +114,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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/snowflake/datadog_checks/snowflake/data/conf.yaml.example b/snowflake/datadog_checks/snowflake/data/conf.yaml.example index 61058f85e80e7..d31a8c4151786 100644 --- a/snowflake/datadog_checks/snowflake/data/conf.yaml.example +++ b/snowflake/datadog_checks/snowflake/data/conf.yaml.example @@ -247,7 +247,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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/datadog_checks/sqlserver/data/conf.yaml.example b/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example index b9157d691a40b..c5a6390c6cd39 100644 --- a/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example +++ b/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example @@ -595,7 +595,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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/teradata/datadog_checks/teradata/data/conf.yaml.example b/teradata/datadog_checks/teradata/data/conf.yaml.example index a47f4dbf1685d..cf07f25f31f89 100644 --- a/teradata/datadog_checks/teradata/data/conf.yaml.example +++ b/teradata/datadog_checks/teradata/data/conf.yaml.example @@ -201,7 +201,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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/vertica/datadog_checks/vertica/data/conf.yaml.example b/vertica/datadog_checks/vertica/data/conf.yaml.example index 8e4ee971513fb..9a4e31db6df78 100644 --- a/vertica/datadog_checks/vertica/data/conf.yaml.example +++ b/vertica/datadog_checks/vertica/data/conf.yaml.example @@ -241,7 +241,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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/datadog_checks/voltdb/data/conf.yaml.example b/voltdb/datadog_checks/voltdb/data/conf.yaml.example index a8f02fb444038..1699fec73915a 100644 --- a/voltdb/datadog_checks/voltdb/data/conf.yaml.example +++ b/voltdb/datadog_checks/voltdb/data/conf.yaml.example @@ -311,7 +311,12 @@ instances: ## - {} ## 3. tags (optional) - A list of tags to apply to each metric. ## 4. collection_interval (optional) - The frequency at which to collect the metrics. - ## The default is the integration `min_collection_interval`. + ## 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 From 5492f351c0d72bc8041b3c90b55558c29096adaa Mon Sep 17 00:00:00 2001 From: Zhengda Lu Date: Mon, 26 Feb 2024 15:32:41 +0000 Subject: [PATCH 7/7] remove duplicate changelog --- datadog_checks_dev/changelog.d/16957.added.1 | 1 - 1 file changed, 1 deletion(-) delete mode 100644 datadog_checks_dev/changelog.d/16957.added.1 diff --git a/datadog_checks_dev/changelog.d/16957.added.1 b/datadog_checks_dev/changelog.d/16957.added.1 deleted file mode 100644 index caf1a030fba34..0000000000000 --- a/datadog_checks_dev/changelog.d/16957.added.1 +++ /dev/null @@ -1 +0,0 @@ -update custom_queries configuration to support optional collection_interval