Commit f9a39ea
[postgres] Exclude rdsadmin database from schema collection by default (DataDog#22470)
* [postgres] Exclude rdsadmin database from schema collection by default
The rdsadmin database is an AWS RDS system database that is not accessible
to users. This change adds it to the default exclude_databases list for
collect_schemas to prevent errors when the Agent attempts to collect schema
information from RDS instances.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* [postgres] Exclude system and admin databases from schema collection by default
Exclude the following databases from schema collection and autodiscovery
by default:
- template0, template1 (PostgreSQL system databases)
- rdsadmin (AWS RDS)
- azure_maintenance (Azure)
- cloudsqladmin, alloydbadmin, alloydbmetadata (Google Cloud)
These databases are either system databases or cloud provider admin databases
that are not accessible to users. This prevents errors when the Agent attempts
to collect schema information or autodiscover databases.
Also introduces DEFAULT_EXCLUDED_DATABASES constant in dict_defaults.py to
avoid duplication of the excluded databases list across:
- instance_database_autodiscovery()
- instance_collect_schemas()
- test_config_defaults.py
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent c97f2a2 commit f9a39ea
5 files changed
Lines changed: 40 additions & 16 deletions
File tree
- postgres
- assets/configuration
- changelog.d
- datadog_checks/postgres
- config_models
- data
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
474 | 478 | | |
475 | | - | |
476 | 479 | | |
477 | 480 | | |
478 | 481 | | |
| |||
794 | 797 | | |
795 | 798 | | |
796 | 799 | | |
797 | | - | |
| 800 | + | |
798 | 801 | | |
799 | 802 | | |
800 | 803 | | |
| |||
803 | 806 | | |
804 | 807 | | |
805 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
806 | 817 | | |
807 | 818 | | |
808 | 819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
10 | 23 | | |
11 | 24 | | |
12 | 25 | | |
| |||
20 | 33 | | |
21 | 34 | | |
22 | 35 | | |
23 | | - | |
| 36 | + | |
24 | 37 | | |
25 | 38 | | |
26 | 39 | | |
| |||
78 | 91 | | |
79 | 92 | | |
80 | 93 | | |
81 | | - | |
| 94 | + | |
82 | 95 | | |
83 | 96 | | |
84 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
| 405 | + | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 59 | + | |
67 | 60 | | |
68 | 61 | | |
69 | 62 | | |
| |||
120 | 113 | | |
121 | 114 | | |
122 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
123 | 122 | | |
124 | 123 | | |
125 | 124 | | |
| |||
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
148 | | - | |
| 147 | + | |
149 | 148 | | |
150 | 149 | | |
151 | 150 | | |
| |||
0 commit comments