├── README.org ├── nginx_connection_request ├── nginx_memory ├── nginx_request └── nginx_status /README.org: -------------------------------------------------------------------------------- 1 | * Nginx requests, memory usage and connections statistics with Munin 2 | 3 | ** Introduction 4 | 5 | These three perl scripts are [[http://munin-monitoring.org][Munin]] plugins for monitoring the [[http://nginx.org][nginx]] 6 | HTTP server. 7 | 8 | ** nginx_status 9 | 10 | Based on the one provided in the Debian [[http://packages.debian.org/squeeze/munin-node][munin-node]] package. Which 11 | is itself a modified version of the one available at the [[http://exchange.munin-monitoring.org][Munin Plugin 12 | Exchange]]. It shows the connection status for nginx. 13 | 14 | Presents the values returned by nginx, using the 15 | [[wiki.nginx.org/NginxHttpStubStatusModule][http_stub_status]] module, are respectively, the number of: 16 | 17 | /connections initiated/, /connections handled/, /requests served/ 18 | 19 | ** TODO nginx_connection_request 20 | 21 | Presents the number of requests served by connection handled by 22 | nginx. The requests-connection ratio handled by the server is the 23 | ratio: 24 | 25 | requests served / connections handled 26 | 27 | This is implemented as a RRDtool datasource of type =GAUGE=, the 28 | [[http://munin-monitoring.org/wiki/fieldname.type][default]] type for Munin. 29 | 30 | ** nginx_request 31 | 32 | Based on the one provided in the Debian [[http://packages.debian.org/squeeze/munin-node][munin-node]] package. Which 33 | is itself a modified version of the one available at the [[http://exchange.munin-monitoring.org][Munin Plugin 34 | Exchange]]. 35 | 36 | It uses a derivative (technically a finite difference) to compute 37 | the connection rate value. 38 | 39 | ** nginx_memory 40 | 41 | Based on a previous plugin by AkyRhO. It uses =ps= and =awk= to get 42 | the memory used by the master and worker processes of nginx. 43 | 44 | ** Installation & Configuration 45 | 46 | 47 | 1. Copy all the scripts to =/etc/munin/plugins=. 48 | 49 | 2. Restart the munin-node daemon: =/etc/init.d/munin-node restart=. 50 | 51 | 3. Done. You should now start to see a new section *nginx* in your 52 | Munin pages with the corresponding graphs. 53 | 54 | 4. All scripts have POD documentation. Issue =perldoc