1

我对 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 等收集的。这些 postgres 表是特定于数据库的,与 pg_stat_activity 或 pg_stat_statements 不同。

4

1 回答 1

2

我得到了第二个问题的答案。现在,我可以从我指定的一个数据库中获取所有表。我需要做的一切;关系正则表达式:'.*' 和禁用的关系名称。

我从 datadog 得到的第一个问题的答案是,如果不单独列出它们,就无法监控所有数据库。他们将来可能会改变这一点,但现在我们必须为我们想要监控的每个数据库添加块

于 2019-11-20T21:00:45.563 回答