Posts

Showing posts from April, 2016

Datadog Integration with Postgres/MongoDB/Apache/Elasticsearch

Datadog has integration with almost any popular services. I have integrated our Datadog to specifically monitor our needed services.

Here is how I did it.

Step 1: Datadog Agent Install Datadog agent for your specific OS in your server. You can download the specific agent in the Datadog UI under Integrations -> Agent.

Step 2: Configure Agent You need to configure the YAML file for each specific service you would like to be monitored.

Postgres: 1. Create a read-only Postgres role with access to pg_stat_database
In our case, we have a 3 servers clustered Postgres with PG-Pool. So you need to create the Postgres role and PG-Pool user in each 3 servers.
A.  Create PG role Connect to your pg instance in each server and run following queries:  $ psql -h server -U postgres -W postgres# createuser datadog withpassword'datadog'; postgres# grantSELECTON pg_stat_database to datadog; B. Create encrypted password with MD5 for PG-Pool Login to each server and run pg_md5: $ sudo pg_md5 -p -m -u…