Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [Nagiosplug-help] check_squid

From: <Ralph.Grothe(at)itdz-berlin.de>
Date: Fri Oct 19 2007 - 11:01:41 EDT


Hi Ryan,

yes, I am afraid your plugin is a completely different one than the one that I use,
though both of them are implemented in Perl.

I can't even compile your plugin (where did you get it from?) because I lack a prerequisite module libplugins.pm

$ perl -cw check_squid1.pl
Can't locate libplugins.pm in @INC (@INC contains: .

/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8) at check_squid1.pl line 34.
BEGIN failed--compilation aborted at check_squid1.pl line 34.

If your system meets the prerequisite libplugins.pm (and possibly others)
then there should be nothing against using this plugin instead.

I don't feel that inclined to look at the implementation of your check_squid.
So I gave it only a very superficial peek for the help message. Unfortunately I couldn't find it (might be in the missing libplugins.pm though?).
I only noticed that although GetOptions takes an $opt_h it never seems to referred to later on.
Maybe this is still work in progress and the plugin author hasn't found time yet
to add the help screen?

Excerpt from your plugin:

     64 
     65 my ($opt_V,$opt_h,$opt_m);
     66 
     67 GetOptions (
     68         "V"             => \$opt_V,     "version"
=> \$opt_V,
     69         "h|?"   => \$opt_h,     "help"
=> \$opt_h,
     70         "man"   => \$opt_m,
     71         "d=i"   => \$DEBUG,     "debug=i"
=> \$DEBUG,
     72         "w=i"   => \$opt_w,     "warning=i"
=> \$opt_w,
     73         "c=i"   => \$opt_c,     "critical=i"    =>
\$opt_c,
     74         "H=s"   => \$opt_H, "hostname=s"        =>
\$opt_H,
     75         "p=s"   => \$opt_p, "password=s"        =>
\$opt_p,
     76         "P=i"   => \$opt_P, "port=i"            =>
\$opt_P,
     77 );

$ grep -n \$opt_h check_squid1.pl
65:my ($opt_V,$opt_h,$opt_m);

69:     "h|?"   => \$opt_h,     "help"                  =>
\$opt_h,
Do you need help?X

Good luck

Ralph

> -----Original Message-----
> From: Wilgoss,RyanEUASN [mailto:r.wilgoss@mitsui.com]
> Sent: Friday, October 19, 2007 3:39 PM
> To: Grothe, Ralph
> Subject: RE: [Nagiosplug-help] check_squid
>
>
> Hi Ralph
>
> Thanks of the reply, I have a feeling I may have a different
> check_squid.pl file. Please see the attached file.
>
> Regards
>
> Ryan
>
> -----Original Message-----
> From: Ralph.Grothe@itdz-berlin.de
> [mailto:Ralph.Grothe@itdz-berlin.de]
> Sent: 19 October 2007 08:39
> To: Wilgoss,RyanEUASN; nagiosplug-help@lists.sourceforge.net
> Subject: RE: [Nagiosplug-help] check_squid
>
> 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@lists.sourceforge.net
> [mailto:nagiosplug-help-bounces@lists.sourceforge.net]On Behalf
> Of Wilgoss,RyanEUASN
> Sent: Thursday, October 18, 2007 1:03 PM
> To: nagiosplug-help@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
>
>



This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

Nagiosplug-help mailing list
Nagiosplug-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null Received on Fri Oct 19 11:02:04 2007

This archive was generated by hypermail 2.1.8 : Wed Jul 16 2008 - 04:36:04 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library