Skip to content

collectors NginxCollector

Rob Smith edited this page Aug 11, 2012 · 16 revisions

NginxCollector

Collect statistics from Nginx

Dependencies

  • urllib2

Usage

To enable the nginx status page to work with defaults, add a file to /etc/nginx/sites-enabled/ (on Ubuntu) with the following content:

  server {
      listen 127.0.0.1:8080;
      server_name localhost;
      location /nginx_status {
          stub_status on;
          access_log /data/server/shared/log/access.log;
          allow 127.0.0.1;
          deny all;
      }
  }

Options

  • Generic Options
  • req_port: Port
  • enabled: Enable collecting these metrics
  • req_path: Path
  • byte_unit: Default numeric output(s)
  • req_host: Hostname

Example Output

__EXAMPLESHERE__
Clone this wiki locally