Skip to content

Commit

Permalink
[postgres] add alloydbadmin & alloydbmetadata to default exclusion li…
Browse files Browse the repository at this point in the history
…st (#19061)

* exclude alloydbadmin & alloydbmetadata

* add changelog
  • Loading branch information
lu-zhengda authored Nov 15, 2024
1 parent ec26732 commit 4161d4d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions postgres/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,16 @@ files:
- rdsadmin
- azure_maintenance
- cloudsqladmin
- alloydbadmin
- alloydbmetadata
default:
- 'template0'
- 'template1'
- rdsadmin
- azure_maintenance
- cloudsqladmin
- alloydbadmin
- alloydbmetadata
- name: ssl
description: |
This option determines whether or not and with what priority a secure SSL TCP/IP connection
Expand Down
1 change: 1 addition & 0 deletions postgres/changelog.d/19061.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add alloydbadmin & alloydbmetadata to default list of databases to exclude from autodiscovery and databases to ignore to prevent failures on GCP AlloyDB for PostgreSQL.
2 changes: 2 additions & 0 deletions postgres/datadog_checks/postgres/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
'rdsadmin',
'azure_maintenance',
'cloudsqladmin',
'alloydbadmin',
'alloydbmetadata',
'postgres',
]

Expand Down
10 changes: 9 additions & 1 deletion postgres/datadog_checks/postgres/config_models/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,15 @@ def instance_idle_connection_timeout():


def instance_ignore_databases():
return ['template0', 'template1', 'rdsadmin', 'azure_maintenance', 'cloudsqladmin']
return [
'template0',
'template1',
'rdsadmin',
'azure_maintenance',
'cloudsqladmin',
'alloydbadmin',
'alloydbmetadata',
]


def instance_log_unobfuscated_plans():
Expand Down
2 changes: 2 additions & 0 deletions postgres/datadog_checks/postgres/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ instances:
# - rdsadmin
# - azure_maintenance
# - cloudsqladmin
# - alloydbadmin
# - alloydbmetadata

## @param ssl - string - optional - default: allow
## This option determines whether or not and with what priority a secure SSL TCP/IP connection
Expand Down
2 changes: 1 addition & 1 deletion postgres/datadog_checks/postgres/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from datadog_checks.postgres.util import DatabaseConfigurationError, warning_with_tags

AUTODISCOVERY_QUERY: str = """select datname from pg_catalog.pg_database where datistemplate = false;"""
DEFAULT_EXCLUDES = ["cloudsqladmin", "rdsadmin"]
DEFAULT_EXCLUDES = ["cloudsqladmin", "rdsadmin", "alloydbadmin", "alloydbmetadata"]
DEFAULT_MAX_DATABASES = 100
DEFAULT_REFRESH = 600

Expand Down

0 comments on commit 4161d4d

Please sign in to comment.