datadog nginx integration
step 1 Verify nginx stub status module installed or not.
root@-s-4vcpu-8gb-blr1-01:~# nginx -V 2>&1| grep -o http_stub_status_module
http_stub_status_module
127.0.0.1/nginx_status
2. configure datadog agent with nginx status module
Metric collection
integrations-core/nginx/datadog_checks/nginx/data/conf.yaml.example
nginx.d/conf.yaml
cd /etc/datadog/
cd /etc/datadog-agent/conf.d/nginx.d
cp conf.yaml.example conf.yaml
chown dd-agent:dd-agent conf.yaml
chmod 644 conf.yaml
nano /etc/datadog-agent/conf.d/nginx.d/conf.yaml
– nginx_status_url: http://localhost:81/nginx_status/
curl http://localhost:81/nginx_status/
verify the nginx status module port & url
root@-s-4vcpu-8gb-blr1-01:/etc/datadog-agent/conf.d/nginx.d# curl http://localhost:80/nginx_status/
Active connections: 55
server accepts handled requests
1071135 1071135 1166584
Reading: 0 Writing: 1 Waiting: 54
1. Set the nginx_status_url parameter to http://localhost:81/nginx_status/ in your nginx.d/conf.yaml file to start gathering your NGINX metrics. See the sample nginx.d/conf.yaml for all available configuration options.
3 Restart the data dog Agent to start sending NGINX metrics to Datadog.
sudo service datadog-agent restart
4. check nginx metrics in datadog dashboard
you have to wait few minutes..
if data not received the check log below. (nginx monitoring metric)
5. check data agent logs for errors
located at
var/log/datadog/
how datadog nginx integration works
pulls metrics from a local NGINX status endpoint, so your nginx binaries need to have been compiled with one of two NGINX status modules:
* stub status module – for open source NGINX
* http status module – only for NGINX Plus
troubleshooting
no data received
ufw block datadog