Jun 152012

Check correct operation of a Squid Web Proxy server

This check command runs a HTTP request through your proxy. You can use it to check the basic proxy operation, authentication and even authentication on a certain web site. You may check for any HTTP error/result code. So this plugin can be useful for checking that certain server do not allow access without authentication, too.

Get the plugin from Nagios Exchange or this site.

Errors and solutions

Error Solution
Can’t locate utils.pm in @INC (…) at check_squid.pl line 21.
BEGIN failed–compilation aborted at check_squid.pl line 21.
Move the script to nagios plugins folder and run it from there
Can’t locate LWP/UserAgent.pm in @INC (…) at ./check_squid.pl line 22.
BEGIN failed–compilation aborted at ./check_squid.pl line 22.
Install perl’s libwww


OR, on FreeBSD, install it from ports


Check from command line:

Nagios config, command definition:

Example service check definition:

  2 Responses to “check_squid.pl – nagios plugin”

  1. Hi, I am try the check_squid.pl

    ./check_squid.pl -u http://www.google.com.gt -p -l 3128 -e 200

    My problem this:

    CRITICAL – Status: 403 Forbidden (but expected 200…)

    What is wrong ?

    • I have no idea, there can be several things. You didn’t specify a user/pass, that might be it if your squid require it.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">