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

Hagen Deike Hagen_Deike at icon-scm.com
Tue May 6 14:31:11 CEST 2003


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: yaps-server
Type: application/octet-stream
Size: 1115 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030506/dd381b28/attachment.obj>


More information about the Users mailing list