After installing Nagios I created three files to define all the services I wanted to monitor:
- hosts.cfg
- hostgroups.cfg
- services.cfg
Squid
I used the check_squid code from http://workaround.org/squid/nagios-plugin/
adding the relevant details to each of my 3 config files for Nagios.
I encountered a problem though as the check_squid perl script makes use of a Perl module LWP::UserAgent which I then had to install manually using:
perl -MCPAN -eshell “install LWP::UserAgent”
After approximately 101 questions I believe it installed, and I checked the check_squid script from the command line again using:
/usr/local/nagios/libexec/check_squid ‘http://google.com’ ” ” ‘cache1.domain.tld’ ‘8080’ ” ” ‘2’
this time received the expected response:
OK – Status: 200 OK