Configuring LibreNMS Nginx statistics

This post might help me in configuring net-snmp to deliver Nginx statistics to LibreNMS.

As such, this post may not be as helpful to you as the official documentation.

Key is this URL:

The nginx.conf file needs something like this:

server {

  server_name localhost;

  location ~ ^/status$ {
    access_log off;
    fastcgi_pass unix:/var/run/php-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    include fastcgi_params;

  location /nginx-status {
    access_log off;
    stub_status on;
    allow all;

NOTE: the fastcgi_pass line might also be fastcgi_pass depending on what you find in /usr/local/etc/php-fpm.conf.

You should see something like this in the script, which you might have copied from

[dan@supernews:/usr/local/etc/snmp] $ grep nginx *
nginx-stats:data = urllib2.urlopen('').read()

I also had this:

$ grep nginx /usr/local/etc/snmpd.conf
extend nginx            /usr/local/etc/snmp/nginx-stats
Website Pin Facebook Twitter Myspace Friendfeed Technorati Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top