Datadog Configuration for Postgres 9.6

Viewed 616

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.

1 Answers

I got the answer to the second question. Now, I can get all tables from one database that I specified. All I needed to do; relation_regex: '.*' and disabled relation_name.

Answer to the first question I got from datadog is that there is no way to monitor all the DBs without listing them individually. They may change this in future, but for now we have to add blocks for each and every database that we want to monitor

Related