Nagios check for nginx with separate metrics

Nikolaos Milas nmilas at noa.gr
Sun Oct 27 19:09:50 UTC 2013


Hello,

I am trying to run a Nagios check for nginx (in Opsview Core) but I have 
a problem: All of the available (to my knowledge) nginx Nagios checks 
(http://exchange.nagios.org/directory/Plugins/Web-Servers/nginx/) 
produce comprehensive output which includes all "metrics" together, 
while I would want one that can output a selected metric at a time, by 
using a parameter, like "-m <metric>," in the following example:

./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s 
nginx_status -o /tmp -m current_requests
- or -
./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s 
nginx_status -o /tmp -m requests_per_second
- or -
./check_nginx.sh -H localhost -P 80 -p /var/run -n nginx.pid -s 
nginx_status -o /tmp -m accesses
etc.

Does anyone know whether such an nginx Nagios check exists (and where) 
or we would have to modify source code of one of these plugins to 
achieve the required behavior? (Frankly, I would be surprised if such a 
check does not exist yet, but I couldn't find one on the Net, despite my 
searches.)

Output with a single metric at a time is important for use in 
server/network monitoring systems.

(I know that the issue is more related to Nagios, but I am hoping that 
someone on this mailing list has faced this problem with monitoring 
NGINX and can point to a solution.)

Thanks and regards,
Nick



More information about the nginx mailing list