Enable postgres data collection :: Kloudfuse Docs

Enable postgres data collection

You must explicitly enable the agent to collect metrics and logs from PostgreSQL.

  1. Deploy the agent on kubernetes.

  2. Run these steps:

kubectl exec -it <pod> bash
psql -U postgres
enter password to complete login

create user datadog with password '<PASSWORD>';
grant pg_monitor to datadog;
grant SELECT ON pg_stat_database to datadog;
  1. In the PostgreSQL pods, add these annotations:
ad.datadoghq.com/mysql.check_names: '["postgres"]'
ad.datadoghq.com/mysql.init_configs: '[{}]'
ad.datadoghq.com/mysql.instances: '[{"host": "%%host%%", "port":5432, "username": "datadog", "password" : "<password>"}]'