我有一个关于postgres 9.6的datadog配置设置的问题。
(1)如何在datadog中监控所有数据库?(2)如何从每个数据库/模式中获取所有表级指标?
下面是conf文件。
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文档并没有真正的帮助。我想要所有的数据库,而不是列出所有的数据库,所以如果我们添加一个新的数据库,我们不需要更改conf文件,对于table_name也是如此。
根据datadog文档,表级指标是使用pg_stat_user_tables、pg_statio_user_tables等收集的。与pg_stat_activity或pg_stat_statements不同,这些postgres表是特定于数据库的。
发布于 2019-11-21 05:00:46
我得到了第二个问题的答案。现在,我可以从我指定的一个数据库中获取所有表。我所需要做的就是: relation_regex:'.*‘并禁用relation_name。
我从datadog得到的第一个问题的答案是,如果不单独列出所有数据库,就无法监控它们。他们将来可能会更改这一点,但目前我们必须为要监视的每个数据库添加数据块
https://stackoverflow.com/questions/58564144
复制相似问题