check_nginx.sh (Visit this link)
from 0 votessh-compliant script to check the nginx webserver whether its running and to get requests and connections per second
= Description =
check_nginx.sh is a Nagios plugin to check whether nginx is running.
It also parses the nginx's status page to get requests and
connections per second as well as requests per connection. You
may have to alter your nginx configuration so that the plugin
can access the server's status page.
The plugin is highly configurable for this reason. See below for
available options.
= Version =
Version 1.1, 2009, Mike Adolphs ([http://www.matejunkie.com/])
= /h/--help Output =
check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid
-s nginx_statut -o /tmp [-w INT] [-c INT] [-S] [-N]
Options:
-H/--hostname)
Defines the hostname. Default is: localhost
-P/--port)
Defines the port. Default is: 80
-p/--path-pid)
Path where nginx's pid file is being stored. You might need
to alter this path according to your distribution. Default
is: /var/run
-n/--name_pid)
Name of the pid file. Default is: nginx.pid
-N/--no-pid-check)
Turn this on, if you don't want to check for a pid file
whether nginx is running, e.g. when you're checking a
remote server. Default is: off
-s/--status-page)
Name of the server's status page defined in the location
directive of your nginx configuration. Default is:
nginx_status
-o/--output-directory)
Specifies where to write the tmp-file that the check creates.
Default is: /tmp
-S/--secure)
In case your server is only reachable via SSL, use this
this switch to use HTTPS instead of HTTP. Default is: off
-w/--warning)
Sets a warning level for requests per second. Default is: off
-c/--critical)
Sets a critical level for requests per second. Default is:
off
= Output example =
user@host: ~ $ ./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s nginx_status -o /tmp -w 15000 -c 20000
OK - nginx is running. 1 requests per second, 1 connections per second (1.00 requests per connection) | 'reqpsec'=1 'conpsec'=1 'conpreq'=1.00 ]
user@host: ~ $ ./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s nginx_status -o /tmp -w 15000 -c 20000
OK - nginx is running. 13722 requests per second, 13725 connections per second (1.00 requests per connection) | 'reqpsec'=13722 'conpsec'=13725 'conpreq'=1.00 ]
user@host: ~ $ ./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s nginx_status -o /tmp -w 10000 -c 15000
WARNING - nginx is running. 12462 requests per second, 12448 connections per second (1.00 requests per connection) | 'reqpsec'=12462 'conpsec'=12448 'conpreq'=1.00
user@host: ~ $ ./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s nginx_status -o /tmp -w 5000 -c 10000
CRITICAL - nginx is running. 14241 requests per second, 14253 connections per second (1.00 requests per connection) | 'reqpsec'=14241 'conpsec'=14253 'conpreq'=1.00
= Changelog =
* 2009-06-15
* nginx_status output is now stored in a variable instead of writing a file (better performance) to a temporary directory
* warning must be lower than critical rather than lower or equal than critical
check_nginx.sh is a Nagios plugin to check whether nginx is running.
It also parses the nginx's status page to get requests and
connections per second as well as requests per connection. You
may have to alter your nginx configuration so that the plugin
can access the server's status page.
The plugin is highly configurable for this reason. See below for
available options.
= Version =
Version 1.1, 2009, Mike Adolphs ([http://www.matejunkie.com/])
= /h/--help Output =
check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid
-s nginx_statut -o /tmp [-w INT] [-c INT] [-S] [-N]
Options:
-H/--hostname)
Defines the hostname. Default is: localhost
-P/--port)
Defines the port. Default is: 80
-p/--path-pid)
Path where nginx's pid file is being stored. You might need
to alter this path according to your distribution. Default
is: /var/run
-n/--name_pid)
Name of the pid file. Default is: nginx.pid
-N/--no-pid-check)
Turn this on, if you don't want to check for a pid file
whether nginx is running, e.g. when you're checking a
remote server. Default is: off
-s/--status-page)
Name of the server's status page defined in the location
directive of your nginx configuration. Default is:
nginx_status
-o/--output-directory)
Specifies where to write the tmp-file that the check creates.
Default is: /tmp
-S/--secure)
In case your server is only reachable via SSL, use this
this switch to use HTTPS instead of HTTP. Default is: off
-w/--warning)
Sets a warning level for requests per second. Default is: off
-c/--critical)
Sets a critical level for requests per second. Default is:
off
= Output example =
user@host: ~ $ ./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s nginx_status -o /tmp -w 15000 -c 20000
OK - nginx is running. 1 requests per second, 1 connections per second (1.00 requests per connection) | 'reqpsec'=1 'conpsec'=1 'conpreq'=1.00 ]
user@host: ~ $ ./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s nginx_status -o /tmp -w 15000 -c 20000
OK - nginx is running. 13722 requests per second, 13725 connections per second (1.00 requests per connection) | 'reqpsec'=13722 'conpsec'=13725 'conpreq'=1.00 ]
user@host: ~ $ ./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s nginx_status -o /tmp -w 10000 -c 15000
WARNING - nginx is running. 12462 requests per second, 12448 connections per second (1.00 requests per connection) | 'reqpsec'=12462 'conpsec'=12448 'conpreq'=1.00
user@host: ~ $ ./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s nginx_status -o /tmp -w 5000 -c 10000
CRITICAL - nginx is running. 14241 requests per second, 14253 connections per second (1.00 requests per connection) | 'reqpsec'=14241 'conpsec'=14253 'conpreq'=1.00
= Changelog =
* 2009-06-15
* nginx_status output is now stored in a variable instead of writing a file (better performance) to a temporary directory
* warning must be lower than critical rather than lower or equal than critical
Submitted by: Mike Adolphs
Hits: 780
Overall downloads: 249
Added: 2009-05-24 00:00:00
Last Modified: 2009-12-16 12:13:10
| Filename | Preview | Size | Description | DL |
|---|---|---|---|---|
| check_nginx.sh | ![]() |
7 kb | The script (Version 1.1) | 434 |
| LICENSE | 53 kb | The appropriate license | 121 |
Comments
Be the first to comment this project.
Leave a reply
If you just want to rate the project leave the other field empty.
Even though it would be nice if you would drop a line.
-
Check SNMP Citrix
from 0 votesCheck Citrix Server Connection Information via SNMP. Extra OID's available through snmp4ctx package (http://www.wtcs.org/snmp4tpc/snmp4ctx.htm) -
check_squid
from 0 votescheck_squid is a plugin to nagios for monitoring Squid by using squidclient -
Check an IIS Application pool state
from 0 votesThis plugin checks for the state of an IIS application pool. -
Siebel CRM monitoring for all platforms
from 0 votesMonitoring of Siebel CRM Application (check of components, tasks, gateway, application server, logfiles and autorestart for components). So far the only Nagios plugin available for Siebel. -
check_bind.sh
from 0 votessh compliant script to check whether BIND is running and to get the performance data via rndc stats (PNP Template included)
-
check_universal_cups
from 0 votesI have all checks combined which other check plugins provided, in this plugin. -
Sun Grid Engine with qping
from 0 votesCheck Sun Grid Engine Daemons using qping(1). -
check_hadoop-dfs.sh
from 0 votessh-compliant script to check the amount of available datanodes of a Hadoop cluster and its total and used size as well. -
EMC Documentum monitor
from 0 votesA collection of nagios check plugins for EMC Documentum -
check_conntrack.sh
from 0 votesA plugin to check the conntrack table.




