Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

Update - 2019-05-28

Moved to another company with no Zabbix and/or Nginx in its environment, hence archiving the repo.

zbx-nginx

Zabbix Template for Nginx statistics. The script is written in Python.

Request Statistics Connection Statistics

System requirements

  • python >= 2.7.9 (e.g. Debian 8 or higher)

  • nginx with configured http_stub_status_module

Features

  • HTTP/HTTPS support
  • Connection Statistics:
    • Active
    • Reading
    • Waiting
    • Writing
  • Request Statistics:
    • Accepted
    • Handled
    • Total
  • 'Requests Statistics' graph
  • 'Connection Status' graph
  • Screen combining both graphs
  • Version information
  • {$NGINX_HOST} and {$NGINX_PORT} macros for customization

Installation

Nginx Configuration

Add the following to your default vhost configuration file:

    location /nginx_status {
        stub_status on;
        access_log   off;
        allow 127.0.0.1;
        allow <external host IP>;
        deny all;
    }

Zabbix Configuration

  1. Copy userparameter_nginx.conf to /etc/zabbix/zabbix_agentd.d folder (or whatever is default and/or configured on your system).

  2. Copy nginx-stat.py to /etc/zabbix/zabbix_agentd.scripts folder. IMPORTANT: if you use another folder for agent scripts, then update userparameter file in the previous step!

  3. Import XML template file (zbx_template_nginx.xml) into Zabbix via Web GUI (Configuration -> Templates -> Import).

  4. Assign the imported template to a host and enjoy!

Troubleshooting

A simple run of the script from a console should give just one number in return, for example:

> /etc/zabbix/zabbix_agentd.scripts/nginx-stat.py -h localhost -p 443 -a active
14

About

Zabbix Template for Nginx

Resources

License

Releases

No releases published

Packages

No packages published

Languages