Datadog Agent PostgreSQL Integration

Kloudfuse can ingest metrics and logs from a self-managed PostgreSQL deployments through the Datadog agent.

For the collector to scrape data from postgres, it requires a few things. Please follow the instructions here and come back to this page.

https://docs.datadoghq.com/database_monitoring/setup_postgres/selfhosted/?tab=postgres10#before-you-begin

 

The postgres instance needs to be annotated as following. Restart postgres after you make these changes.

postgresql: primary: podAnnotations: ad.datadoghq.com/postgresql.check_names: '["postgres"]' ad.datadoghq.com/postgresql.init_configs: '[{}]' ad.datadoghq.com/postgresql.instances: '[{"host": "%%host%%", "port":5432, "username": "<user-you-created>", "password" : "<password-you-chose>", "tags" : []}]' readReplicas: podAnnotations: ad.datadoghq.com/postgresql.check_names: '["postgres"]' ad.datadoghq.com/postgresql.init_configs: '[{}]' ad.datadoghq.com/postgresql.instances: '[{"host": "%%host%%", "port":5432, "username": "<user-you-created>", "password" : "<password-you-chose>", "tags" : []}]'