[Nagiosplug-help] check_squid.pl cannot run in Nagios ; works from the CLI

Peter Spatz peter.spatz at xchanging.com
Thu Dec 10 07:44:36 CET 2009


 

Mit freundlichen Grüßen / Best Regards

 

Peter Spatz
IT Networks & Support – Data Center Services

Xchanging Transaction Bank GmbH
Wilhelm-Fay-Straße 31-37
65936 Frankfurt
Germany

IT Service Desk:        +49 (0) 69 12012 64446
Facsimile:              +49 (0) 69 12012 68825
Hotline Mailbox:        pchelp at xchanging.com <mailto:pchelp at xchanging.com> 
E-mail:                 peter.spatz at xchanging.com
Web:

----- Originalnachricht -----
Von: J4 <junk4 at klunky.co.uk>
An: nagiosplug-help at lists.sourceforge.net <nagiosplug-help at lists.sourceforge.net>
Gesendet: Wed Dec 09 14:49:12 2009
Betreff: [Nagiosplug-help] check_squid.pl cannot run in Nagios ;works from the CLI

Hi,

    I have just installed Nagios on a new system for testing purposes. 
I have downloaded a plugin and copied it into
/usr/local/nagios/libexec/check_squid.pl

The script is available from here: 
http://exchange.nagios.org/directory/Plugins/Websites%2C-Forms-and-Transactions/Squid-Web-Proxy/details
Or from tinyURL:  http://tinyurl.com/yzt8g2o

I have created a service:
define service{
        use                             remote-service         ; Name of
service template to use
        host_name                       fredprox
        service_description             SQUID
        check_command                   check_squid
        notifications_enabled           0
        }


I have created a command:
# 'check_squid' command definition
define command{
        command_name    check_squid
        command_line    $USER1$/check_squid.pl -u http://www.google.com
-p fredprox -l 8080 -e200
        }



If I run the script from the command line I have:
# ./check_squid.pl -u http://www.google.com -p fredprox -l 8080 -e200
OK - Status: 200 OK


However, using it from within Nagios causes the error:[1260361223]
EXTERNAL COMMAND: ENABLE_HOST_SVC_CHECKS;demeter
[1260361245] EXTERNAL COMMAND:
SCHEDULE_FORCED_SVC_CHECK;demeter;SQUID;1260361244
[1260361253] SERVICE ALERT: demeter;SQUID;CRITICAL;SOFT;1;(null)
[1260361287] EXTERNAL COMMAND: ENABLE_SVC_NOTIFICATIONS;demeter;SQUID
[1260361295] EXTERNAL COMMAND: ENABLE_SVC_NOTIFICATIONS;demeter;SQUID
[1260361309] EXTERNAL COMMAND: ENABLE_SVC_NOTIFICATIONS;demeter;SSH
[1260361313] SERVICE ALERT: demeter;SQUID;CRITICAL;SOFT;2;(null)
[1260361373] SERVICE ALERT: demeter;SQUID;CRITICAL;SOFT;3;(null)
[1260361433] SERVICE ALERT: demeter;SQUID;CRITICAL;HARD;4;(null)
[1260361433] SERVICE NOTIFICATION:
nagiosadmin;demeter;SQUID;CRITICAL;notify-service-by-email;(null)


I have set debugging to 128, but nagios.debug is empty.

I expect that I do not have a clear understanding (or any understanding)
of the plugins, and find the documentation bewildering, to be frank :(

Perhaps, it has something to do with the $USER1$ specification in the
command, but I could not find any documentation about this and what it
was used for.

Does anyone have any advise, or even the answers?

Best regards, J.

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at 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

Xchanging Transaction Bank GmbH - HRB 58 951 - Sitz Frankfurt - Amtsgericht Frankfurt am Main
Vorsitzender des Aufsichtsrats: Andreas Povel - Geschaeftsfuehrer: Richard Breitenbuecher, Matthias Sohler


-----------------------------------------------------------------------------------------------
"Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden."
-----------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20091210/b6d333e0/attachment.html>


More information about the Help mailing list