Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

micoots

Reviews(1)
Using the latest squid with CentOS 7.3.1611.

Squid is configured to only allow proxy authenticated users to access it, which includes squidclient.

The Nagios plugin script defines the call to squidclient as:

@exec = ("-h", "\Q$host", "-p", "\Q$port", "-U", "\Q$user", "-W", "\Q$password", "mgr:info");

which is incorrect, since the -U and -W must be -u and -w for squidclient.

So modifying to:

@exec = ("-h", "\Q$host", "-p", "\Q$port", "-u", "\Q$user", "-w", "\Q$password", "mgr:info");

makes the script work.

Note that the error output of:

Use of uninitialized value in sprintf at /usr/share/perl5/vendor_perl/Nagios/Plugin/Performance.pm line 68.

is only there because the script doesn't check whether it has access to the cache manager, so when it's blocked outputs that error. When it has access to the cache manage (when the proxy auth works) then the output will be properly returned.

What this means, is if you are getting the error above, YOU ARE NOT authenticating successfully to the Squid proxy server. You can check this with a squidclient command of:

squidclient -h 10.2.40.78 -p 3128 -u someuser -w somepasword mgr:info

which will confirm whether you have access or not (change someuser and somepassword to whatever you have for the proxy auth).

If the above squidclient command works for you and you don't get an "access denied" output, then the modification of the one line above will also work for you with the output being like:

SQUID_NG OK - Squid have 2 clients and 0 ICP requests queued | 'HTTP requests'=3c;; 'sent ICP requests'=0c;; 'received ICP requests'=0c;;