Send notifincation by sms and check_squid in nagios

Hugo van der Kooij hvdkooij at vanderkooij.org
Mon Apr 10 07:57:45 CEST 2006


On Mon, 10 Apr 2006, Marzieh Raoufnezhad wrote:

> I installed nagios-2.0.tar.gz and nagios-plugin-1.4.2.tar.gz.
> Now I have some problem.

And how much have you read before you send this message? Please indicate
what you have tested step by step.

> 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.

First off: Do notification work in general? Do you have log entries for
notifications? If not, Look into the general notification area and don't
even try to add another notification type untill you can get email
notification to work.

> 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$
>         }

And the nagios user (or whome ever you run nagioas as) can use sendsms?
And I strongly doubt multiple lines are allowed with SMS.

> 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)

Is $USER1$ set? To where is it set?

Hugo.

-- 
	I hate duplicates. Just reply to the relevant mailinglist.
	hvdkooij at vanderkooij.org		http://hvdkooij.xs4all.nl/
		Don't meddle in the affairs of magicians,
		for they are subtle and quick to anger.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list