AW: Notification Problem on Escalations with yaps- 0.96 (parallelizing)

Michael Hüttig Michael.Huettig at Medien-Systempartner.de
Fri May 9 13:36:17 CEST 2003


Am Dienstag, 6. Mai 2003 14:31 schrieb Hagen Deike:
Hi Hagen,
thank you for the yaps-server, this was the right idea, but one more question: 
Which command have you defined for notifiing via sms? Tell me, how comes the 
notfication of nagios into the pipe?

Here is my command:

# 'notify-by-sms' command definition
define command{
        command_name    notify-by-sms
        command_line    /usr/bin/yaps -t $CONTACTPAGER$ "$NOTIFICATIONTYPE$: 
$HOSTNAME$: $SERVICEDESC$ is $SERVICESTATE$ ($OUTPUT$)"
        }

# 'host-notify-by-sms' command definition
define command{
        command_name    host-notify-by-sms
        command_line    /usr/bin/yaps -t $CONTACTPAGER$ "$NOTIFICATIONTYPE$: 
$HOSTNAME$ is $HOSTSTATE$ ($OUTPUT$)"
        }

Thanks,
Michael

> Hi,
>
> For all of you having trouble by sending SMS to more that one with Yaps I
> got a little script for you...
>
> "yaps-server" is a shell script that takes the requests from Nagios and
> sends them one by one.
>
> -------------------------------------------------------
> Copy the script some where you like e.g. /usr/bin
>
> Create a pipe like discribed in the script ( /var/spool/nagios/yaps.cmd)
> (This is the place where the Nagios commandfile is created on SuSE Linux)
>
> Make sure the yaps-server is allways started when Nagios starts.
> (Add a few lines to the Nagios start/stop script)
>
>   YAPS_SERVER=/usr/bin/yasp-server
>   PIDS=$(ps -auxw|grep $YAPS_SERVER | grep -v grep | awk "{printf(\"%d \",
> \$2); }")
>   test -n "$PIDS" && kill -TERM $PIDS
>   su $USR -c "exec $YAPS_SERVER &"
>
> (This will probably only work with the start/stop script of the Nagios rpm
> for SuSE. Anyway give it a try)
>
> Restart Nagios and look if the process is up and running
> You can test it by typing following to the shell
>
> # echo "<your mobile phone number>" "\"<Your message goes here>\"" >
> /var/spool/nagios/yaps.cmd
>
> If it works, just change the configuration string in Nagios (command_line)
> into the command you just entered...
> That's it.
> --------------------------------------------------------
>
> I like to thank my collegue here for writing this small fine script.
>
> Regards,
> Hagen Deike



**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft.
www.mimesweeper.com
**********************************************************************



-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
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