I have a question about the configuration setting for datadog for postgres 9.6.
(1) How do I get all databases monitored in datadog? (2) How do I get all table level metrics from each database/schema?
Here is conf file.
init_config:
instances:
- host: host_name_goes_here
port: port_number_goes_here
username: datadog
password: password_goes_here
dbname: db_name1
relations:
- relation_name: table_1 --This will only give you metrics for table specified here.
- relation_regex: '.*' --This will give you metrics for all the tables in the database.
Datadog documents are not really helpful. Instead of listing all the dbs, I want all databases, so if we add a new db, we don't have to change the conf file and same goes for table_name.
According to datadog docs, the table level metrics are collected using pg_stat_user_tables, pg_statio_user_tables etc. And these postgres tables are database specific unlike pg_stat_activity or pg_stat_statements.