[Nagiosplug-help] check_squid
Ralph.Grothe at itdz-berlin.de
Ralph.Grothe at itdz-berlin.de
Fri Oct 19 09:39:14 CEST 2007
Every officially distributed plugin is expected to display a help
screen showing a synopsis of its basic usage
when called with the arg -h or --help.
So does check_squid, though admittedly its output is rather
terse.
$ check_squid --help
Usage: url urluser urlpass proxy proxyport proxyuser proxypass
expectstatus
url -> The URL to check on the internet
(http://www.google.com)
urluser -> Username if the web site required authentication
(- = none)
urlpass -> Password if the web site required authentication
(- = none)
proxy -> Server that squid runs on (proxy.mydomain)
proxyport -> TCP port that Squid listens on (3128)
proxyuser -> Username if the web site required authentication
(- = none)
proxypass -> Password if the web site required authentication
(- = none)
expectstatus -> HTTP code that should be returned
(2 = anything that begins with 2)
I use this plugin to check a few of our Squid servers.
So this is what my command definition looks like.
(note that this plugin requires a definite argument
signature as it doesn't seem to use the getopt() parsing
function, which is rather unusual)
define command {
command_name check-squid
command_line $USER1$/check_squid $ARG1$ $ARG2$ $ARG3$
$HOSTADDRESS$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
}
On of my service definition for this command looks like this.
define service {
use generic-service
service_description Squid
servicegroups webservices
hostgroup_name squid_hosts
check_command
check-squid!http://www.nagios.org/!-!-!8080!$USER18$!$USER19$!2
notification_interval 60
contact_groups squid_admin
}
Note that $ARG5$ and $ARG6$ contain the credentials for a user to
authenticate with the proxy.
These map to args No. 6 and 7 according to the help screen of
check_squid
and are here defined as Nagios macros $USER18$ and $USER19$
which themselves are defined in the config file resources.cfg
which should be only readable by
the OS users nagios (given your Nagios server runs under this
account) or root.
-----Original Message-----
From: nagiosplug-help-bounces at lists.sourceforge.net
[mailto:nagiosplug-help-bounces at lists.sourceforge.net]On Behalf
Of Wilgoss,RyanEUASN
Sent: Thursday, October 18, 2007 1:03 PM
To: nagiosplug-help at lists.sourceforge.net
Subject: [Nagiosplug-help] check_squid
Dear Sirs
I am new to Nagios and therefore the plugins and was interested
in the check_squid module. Could you please
point me in the right direction as to how to install and use
this.
Thanks
Ryan
More information about the Help
mailing list