From 7661ed299089fad56afb2fa8624c139e1c07a5bd Mon Sep 17 00:00:00 2001 From: Seth Samuel Date: Wed, 17 Apr 2024 08:24:53 -0400 Subject: [PATCH] Fix default value for pg_stat_statements_view (#17400) --- postgres/assets/configuration/spec.yaml | 1 + postgres/changelog.d/17400.fixed | 1 + postgres/datadog_checks/postgres/config_models/defaults.py | 2 +- postgres/datadog_checks/postgres/data/conf.yaml.example | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 postgres/changelog.d/17400.fixed diff --git a/postgres/assets/configuration/spec.yaml b/postgres/assets/configuration/spec.yaml index 40d5fad16c837..d7da8edd37e2a 100644 --- a/postgres/assets/configuration/spec.yaml +++ b/postgres/assets/configuration/spec.yaml @@ -402,6 +402,7 @@ files: value: type: string example: show_pg_stat_statements() + display_default: pg_stat_statements - name: query_metrics description: Configure collection of query metrics options: diff --git a/postgres/changelog.d/17400.fixed b/postgres/changelog.d/17400.fixed new file mode 100644 index 0000000000000..fb3d0edb0310d --- /dev/null +++ b/postgres/changelog.d/17400.fixed @@ -0,0 +1 @@ +Fix default value for pg_stat_statements_view diff --git a/postgres/datadog_checks/postgres/config_models/defaults.py b/postgres/datadog_checks/postgres/config_models/defaults.py index a32855beee8c3..027a7897798ba 100644 --- a/postgres/datadog_checks/postgres/config_models/defaults.py +++ b/postgres/datadog_checks/postgres/config_models/defaults.py @@ -109,7 +109,7 @@ def instance_min_collection_interval(): def instance_pg_stat_statements_view(): - return 'show_pg_stat_statements()' + return 'pg_stat_statements' def instance_port(): diff --git a/postgres/datadog_checks/postgres/data/conf.yaml.example b/postgres/datadog_checks/postgres/data/conf.yaml.example index 96492f63b68d2..606b87a1fc12b 100644 --- a/postgres/datadog_checks/postgres/data/conf.yaml.example +++ b/postgres/datadog_checks/postgres/data/conf.yaml.example @@ -311,7 +311,7 @@ instances: # # dbm: false - ## @param pg_stat_statements_view - string - optional - default: show_pg_stat_statements() + ## @param pg_stat_statements_view - string - optional - default: pg_stat_statements ## Set this value if you want to define a custom view or function to allow the datadog user to query the ## `pg_stat_statements` table, which is useful for restricting the permissions given to the datadog agent. ## Please note this is an ALPHA feature and is subject to change or deprecation without notice.