From 6374198afe6b1eb06d76165c1951d282209acc6f Mon Sep 17 00:00:00 2001 From: Florent Clarret Date: Thu, 7 Mar 2024 07:41:34 +0000 Subject: [PATCH] Update the configuration to include the `metric_prefix` option (#17065) * Update the configuration to include the `metric_prefix` option * Update the configuration to include the `metric_prefix` option --- clickhouse/changelog.d/17065.fixed | 1 + .../datadog_checks/clickhouse/config_models/instance.py | 1 + clickhouse/datadog_checks/clickhouse/data/conf.yaml.example | 1 + datadog_checks_dev/changelog.d/17065.fixed | 1 + .../dev/tooling/templates/configuration/instances/db.yaml | 4 ++++ mysql/assets/configuration/spec.yaml | 1 + mysql/changelog.d/17065.fixed | 1 + mysql/datadog_checks/mysql/config_models/instance.py | 1 + mysql/datadog_checks/mysql/data/conf.yaml.example | 2 ++ oracle/changelog.d/17065.fixed | 1 + oracle/datadog_checks/oracle/config_models/instance.py | 1 + oracle/datadog_checks/oracle/data/conf.yaml.example | 2 ++ sap_hana/changelog.d/17065.fixed | 1 + sap_hana/datadog_checks/sap_hana/config_models/instance.py | 1 + sap_hana/datadog_checks/sap_hana/data/conf.yaml.example | 2 ++ singlestore/changelog.d/17065.fixed | 1 + .../datadog_checks/singlestore/config_models/instance.py | 1 + singlestore/datadog_checks/singlestore/data/conf.yaml.example | 2 ++ snowflake/changelog.d/17065.fixed | 1 + snowflake/datadog_checks/snowflake/config_models/instance.py | 1 + snowflake/datadog_checks/snowflake/data/conf.yaml.example | 1 + sqlserver/changelog.d/17065.fixed | 1 + sqlserver/datadog_checks/sqlserver/config_models/instance.py | 1 + sqlserver/datadog_checks/sqlserver/data/conf.yaml.example | 2 ++ teradata/changelog.d/17065.fixed | 1 + teradata/datadog_checks/teradata/config_models/instance.py | 1 + teradata/datadog_checks/teradata/data/conf.yaml.example | 2 ++ vertica/changelog.d/17065.fixed | 1 + vertica/datadog_checks/vertica/config_models/instance.py | 1 + vertica/datadog_checks/vertica/data/conf.yaml.example | 1 + voltdb/changelog.d/17065.fixed | 1 + voltdb/datadog_checks/voltdb/config_models/instance.py | 1 + voltdb/datadog_checks/voltdb/data/conf.yaml.example | 2 ++ 33 files changed, 43 insertions(+) create mode 100644 clickhouse/changelog.d/17065.fixed create mode 100644 datadog_checks_dev/changelog.d/17065.fixed create mode 100644 mysql/changelog.d/17065.fixed create mode 100644 oracle/changelog.d/17065.fixed create mode 100644 sap_hana/changelog.d/17065.fixed create mode 100644 singlestore/changelog.d/17065.fixed create mode 100644 snowflake/changelog.d/17065.fixed create mode 100644 sqlserver/changelog.d/17065.fixed create mode 100644 teradata/changelog.d/17065.fixed create mode 100644 vertica/changelog.d/17065.fixed create mode 100644 voltdb/changelog.d/17065.fixed diff --git a/clickhouse/changelog.d/17065.fixed b/clickhouse/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/clickhouse/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option diff --git a/clickhouse/datadog_checks/clickhouse/config_models/instance.py b/clickhouse/datadog_checks/clickhouse/config_models/instance.py index 608dbcde1f6be..c8ce7fa7c2dab 100644 --- a/clickhouse/datadog_checks/clickhouse/config_models/instance.py +++ b/clickhouse/datadog_checks/clickhouse/config_models/instance.py @@ -27,6 +27,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 b3c3f67e0f691..2b19c052ae599 100644 --- a/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example +++ b/clickhouse/datadog_checks/clickhouse/data/conf.yaml.example @@ -139,6 +139,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo diff --git a/datadog_checks_dev/changelog.d/17065.fixed b/datadog_checks_dev/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/datadog_checks_dev/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option 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 ef690c09c8049..740acb624b51f 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 @@ -66,6 +66,7 @@ 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. + 5. metric_prefix (optional) - The prefix to apply to each metric. value: type: array items: @@ -83,6 +84,8 @@ type: string - name: collection_interval type: integer + - name: metric_prefix + type: string example: - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo columns: @@ -93,3 +96,4 @@ tags: - test: collection_interval: 30 + metric_prefix: foo_prefix diff --git a/mysql/assets/configuration/spec.yaml b/mysql/assets/configuration/spec.yaml index 074a08a6a56b7..55386d67ffaf0 100644 --- a/mysql/assets/configuration/spec.yaml +++ b/mysql/assets/configuration/spec.yaml @@ -128,6 +128,7 @@ files: type: gauge tags: - test:mysql + metric_prefix: mysql - name: additional_status description: | Set this parameter to collect additional MySQL status variables as metrics diff --git a/mysql/changelog.d/17065.fixed b/mysql/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/mysql/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option diff --git a/mysql/datadog_checks/mysql/config_models/instance.py b/mysql/datadog_checks/mysql/config_models/instance.py index baed96228234c..3a809ae346156 100644 --- a/mysql/datadog_checks/mysql/config_models/instance.py +++ b/mysql/datadog_checks/mysql/config_models/instance.py @@ -53,6 +53,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 8aab673e8fd2d..1e1f10cca7a70 100644 --- a/mysql/datadog_checks/mysql/data/conf.yaml.example +++ b/mysql/datadog_checks/mysql/data/conf.yaml.example @@ -162,6 +162,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -172,6 +173,7 @@ instances: # type: gauge # tags: # - test:mysql + # metric_prefix: mysql ## @param additional_status - list of mappings - optional ## Set this parameter to collect additional MySQL status variables as metrics diff --git a/oracle/changelog.d/17065.fixed b/oracle/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/oracle/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option diff --git a/oracle/datadog_checks/oracle/config_models/instance.py b/oracle/datadog_checks/oracle/config_models/instance.py index 2b679996b299b..e30dd47f385b2 100644 --- a/oracle/datadog_checks/oracle/config_models/instance.py +++ b/oracle/datadog_checks/oracle/config_models/instance.py @@ -27,6 +27,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 b66dedc067a5f..2482c8e71519e 100644 --- a/oracle/datadog_checks/oracle/data/conf.yaml.example +++ b/oracle/datadog_checks/oracle/data/conf.yaml.example @@ -153,6 +153,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -164,6 +165,7 @@ instances: # tags: # - test: # collection_interval: 30 + # metric_prefix: foo_prefix ## @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/17065.fixed b/sap_hana/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/sap_hana/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option 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 55c303564c526..ed64bcd15787e 100644 --- a/sap_hana/datadog_checks/sap_hana/config_models/instance.py +++ b/sap_hana/datadog_checks/sap_hana/config_models/instance.py @@ -27,6 +27,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 9d795b07175aa..b2a8228da4603 100644 --- a/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example +++ b/sap_hana/datadog_checks/sap_hana/data/conf.yaml.example @@ -145,6 +145,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -156,6 +157,7 @@ instances: # tags: # - test: # collection_interval: 30 + # metric_prefix: foo_prefix ## @param persist_db_connections - boolean - optional - default: true ## Whether or not to persist database connections. diff --git a/singlestore/changelog.d/17065.fixed b/singlestore/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/singlestore/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option diff --git a/singlestore/datadog_checks/singlestore/config_models/instance.py b/singlestore/datadog_checks/singlestore/config_models/instance.py index 9717711652b1e..2901c4db09daf 100644 --- a/singlestore/datadog_checks/singlestore/config_models/instance.py +++ b/singlestore/datadog_checks/singlestore/config_models/instance.py @@ -27,6 +27,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 be1cb92a138b7..099d5b5621c1b 100644 --- a/singlestore/datadog_checks/singlestore/data/conf.yaml.example +++ b/singlestore/datadog_checks/singlestore/data/conf.yaml.example @@ -120,6 +120,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -131,6 +132,7 @@ instances: # tags: # - test: # collection_interval: 30 + # metric_prefix: foo_prefix ## @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/17065.fixed b/snowflake/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/snowflake/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option diff --git a/snowflake/datadog_checks/snowflake/config_models/instance.py b/snowflake/datadog_checks/snowflake/config_models/instance.py index 92726997cc175..d251405591af3 100644 --- a/snowflake/datadog_checks/snowflake/config_models/instance.py +++ b/snowflake/datadog_checks/snowflake/config_models/instance.py @@ -27,6 +27,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 ad0ccb53a1319..71c302d2da7c6 100644 --- a/snowflake/datadog_checks/snowflake/data/conf.yaml.example +++ b/snowflake/datadog_checks/snowflake/data/conf.yaml.example @@ -253,6 +253,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo diff --git a/sqlserver/changelog.d/17065.fixed b/sqlserver/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/sqlserver/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option diff --git a/sqlserver/datadog_checks/sqlserver/config_models/instance.py b/sqlserver/datadog_checks/sqlserver/config_models/instance.py index 782f2a3873f33..5cd5aa6dd8599 100644 --- a/sqlserver/datadog_checks/sqlserver/config_models/instance.py +++ b/sqlserver/datadog_checks/sqlserver/config_models/instance.py @@ -53,6 +53,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 039f58878c99d..f28d03cb33c28 100644 --- a/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example +++ b/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example @@ -611,6 +611,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -622,6 +623,7 @@ instances: # tags: # - test: # collection_interval: 30 + # metric_prefix: foo_prefix ## @param stored_procedure - string - optional ## DEPRECATED - use `custom_queries` instead. For guidance, see: diff --git a/teradata/changelog.d/17065.fixed b/teradata/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/teradata/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option diff --git a/teradata/datadog_checks/teradata/config_models/instance.py b/teradata/datadog_checks/teradata/config_models/instance.py index 38cfd5f186465..2e6d572ce27f3 100644 --- a/teradata/datadog_checks/teradata/config_models/instance.py +++ b/teradata/datadog_checks/teradata/config_models/instance.py @@ -28,6 +28,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 cf07f25f31f89..ff3adfb6c6f35 100644 --- a/teradata/datadog_checks/teradata/data/conf.yaml.example +++ b/teradata/datadog_checks/teradata/data/conf.yaml.example @@ -207,6 +207,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -218,6 +219,7 @@ instances: # tags: # - test: # collection_interval: 30 + # metric_prefix: foo_prefix ## @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/17065.fixed b/vertica/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/vertica/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option diff --git a/vertica/datadog_checks/vertica/config_models/instance.py b/vertica/datadog_checks/vertica/config_models/instance.py index 0cd30978ee63a..639ff20ee415c 100644 --- a/vertica/datadog_checks/vertica/config_models/instance.py +++ b/vertica/datadog_checks/vertica/config_models/instance.py @@ -27,6 +27,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 20d3217812711..c583b6550343b 100644 --- a/vertica/datadog_checks/vertica/data/conf.yaml.example +++ b/vertica/datadog_checks/vertica/data/conf.yaml.example @@ -247,6 +247,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT force_outer, table_name FROM v_catalog.tables diff --git a/voltdb/changelog.d/17065.fixed b/voltdb/changelog.d/17065.fixed new file mode 100644 index 0000000000000..dd3cdf817db74 --- /dev/null +++ b/voltdb/changelog.d/17065.fixed @@ -0,0 +1 @@ +Update the configuration to include the `metric_prefix` option diff --git a/voltdb/datadog_checks/voltdb/config_models/instance.py b/voltdb/datadog_checks/voltdb/config_models/instance.py index 0f45304a34dc8..a7f4754f3375b 100644 --- a/voltdb/datadog_checks/voltdb/config_models/instance.py +++ b/voltdb/datadog_checks/voltdb/config_models/instance.py @@ -36,6 +36,7 @@ class CustomQuery(BaseModel): ) collection_interval: Optional[int] = None columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None + metric_prefix: Optional[str] = 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 1699fec73915a..0ac3e94bbd7d7 100644 --- a/voltdb/datadog_checks/voltdb/data/conf.yaml.example +++ b/voltdb/datadog_checks/voltdb/data/conf.yaml.example @@ -317,6 +317,7 @@ instances: ## 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. + ## 5. metric_prefix (optional) - The prefix to apply to each metric. # # custom_queries: # - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo @@ -328,6 +329,7 @@ instances: # tags: # - test: # collection_interval: 30 + # metric_prefix: foo_prefix ## @param tags - list of strings - optional ## A list of tags to attach to every metric and service check emitted by this instance.