Sumologic

NGINX

Archagent collects NGINX metrics via the stub status module. You need to enable the module and simply specify the listening port & the stats url. If unspecified, the default values as below will be used

"nginx": {
      "port": 80,
      "path": "/nginx_status"
  }

Having updated data.json on your server (no need to restart archagent), enable this plugin from the server's rule config page. Set thresholds for metrics that you care about and want to be alerted on. Enabling a plugin.

Enabling stats reporting in NGINX

NGINX must be compiled with HttpStubStatusModule to enable the stats reporting. To verify, run the following

nginx -V 2>&1 | grep -o with-http_stub_status_module

If you do not see the output as with-http_stub_status_module, install the nginx-full package or use the --with-http_stub_status_module configuration parameter when building NGINX from source.

Changes to be made in nginx.conf:

Add the following to your nginx site, inside main server {..} block.

location /nginx_status {
     stub_status on;        
     access_log   off;      
     allow 127.0.0.1;       
     deny all;              
}

Make sure to add the corresponding server block in /etc/nginx/sites-enabled/* or enable it via nginx command line and reload the configs with nginx -s reload or service nginx reload

More details about the metrics can be found here

results matching ""

    No results matching ""