Send notifincation by sms and check_squid in nagios

Marzieh Raoufnezhad raoufnezhad at gmail.com
Mon Apr 10 05:53:36 CEST 2006


Hi,
I installed nagios-2.0.tar.gz and nagios-plugin-1.4.2.tar.gz.
Now I have some problem.
1-I want to send notification by SMS (whit GSM Modem), I installed
smstools.tar.gz. this package work very well when I use it in the command
line:

# sendsms "my phone number" "my message"

But I don't receive any messages in the nagios program.

my command that I use to nagios(misccommand) is:
define command{
        command_name    notify-by-sms
        command_line    /usr/bin/printf "%b" "***** Nagios
1.0b3*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" |
/usr/bin/sendsms  $CONTACTPAGER$
        }

2- I want to check squid status in the nagios. I downloaded check_squid.pl
and libplugins.pm and do below steps:
       - cp check_squid.pl /usr/local/nagios/libexe
       - cp libplugins.pm /usr/local/nagios/libexe
       - chmod +x check_squid.pl
       - and in the checkcommnad:
define command{
        command_name    check_squid
        command_line    $USER1$/check_squid '$ARG1$' '$ARG2$' '$ARG3$'
'$ARG4$' '$ARG5$' '$ARG6$' '$ARG7$' '$ARG8$'
        }
       - then I use this command to services.cfg file.
But I have this message to service detail page  /information:
(Return code of 127 is out of bounds - plugin may be missing)

Now would you please help me ?

Thanks a lot.
Raoufnezhad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060410/429b83f6/attachment.html>


More information about the Users mailing list