Nagios plugin for checking Squid
I once needed a way to make sure our Squid proxy cluster operates correctly. So I wrote a rather simple Squid check plugin for the Nagios monitoring software. André Moura has pimped it further. Feel free to use it. It's also available from monitoringexchange.org.
| Attachment | Size |
|---|---|
| check_squid.pl.txt | 3.45 KB |
- Tags:
Comments
Status: 400 URL must be absolute
Hi,
As you can see I tried many known and unknown URLs, but never received the correct responce. Very odd.
root@ABC-1234:/usr/local/nagios/libexec# ./check_squid.pl -u http://www.klunky.co.uk -p fredprox -l 8080 -e200
CRITICAL - Status: 406 Not Acceptable (but expected 200...)
root@ABC-1234:/usr/local/nagios/libexec# ./check_squid.pl -u http://www.klunky.co.uk/ -p fredprox -l 8080 -e200
CRITICAL - Status: 406 Not Acceptable (but expected 200...)
root@ABC-1234:/usr/local/nagios/libexec# ./check_squid.pl -url=http://www.klunky.co.uk/ -p fredprox -l 8080 -e200
CRITICAL - Status: 400 URL must be absolute (but expected 200...)
root@ABC-1234:/usr/local/nagios/libexec# ./check_squid.pl -url=http://www.google.com -p fredprox -l 8080 -e200
CRITICAL - Status: 400 URL must be absolute (but expected 200...)
root@ABC-1234:/usr/local/nagios/libexec# ./check_squid.pl -url=http://www.google.com/ -p fredprox -l 8080 -e200
CRITICAL - Status: 400 URL must be absolute (but expected 200...)
root@ABC-1234:/usr/local/nagios/libexec# ./check_squid.pl -url=http://www.google.com/index.html -p fredprox -l 8080 -e200
CRITICAL - Status: 400 URL must be absolute (but expected 200...)
root@ABC-1234:/usr/local/nagios/libexec#./check_squid.pl -url=http://www.simonloewen.com/ -p fredprox-l 8080 -e200
CRITICAL - Status: 400 URL must be absolute (but expected 200...)
root@ABC-1234:/usr/local/nagios/libexec#./check_squid.pl -u http://www.simonloewen.com/ -p fredprox-l 8080 -e200
CRITICAL - Status: 406 Not Acceptable (but expected 200...)
Best regards, me
Power of example
Your problem is that you give the last parameter wrong. It is "-e 200" not "-e200" (although -h says so).
Example:
check_squid.pl -u http://yahoo.com -p proxy.server.com -l 3128 -e 200
Good luck!