My Own Command Deinifition Weird Behavior.

Net Warrior netwarrior863 at gmail.com
Thu Aug 16 14:28:30 CEST 2012


Hi there guys.

I defined my own command to use an internal sms sistems, so we can send an
sms alert along with the e-mail ones.
This is what the script do.
#!/bin/bash

HOST=$1
STATE=$2
lynx http://server:8888/SMSService/$HOST-State-$STATE

The command definition is:

# send-sms
define command{
       command_name   send-sms
       command_line     /path/sms.sh $HOSTNAME$ $SERVICESTATE$
       }

The problem is that with some host I receive the SERVICESTATE condition, Ok
or Critical, but with others dont, only get $
As I can see on the debug file:

Processed notification command: /path/sms.sh server333 CRITICAL -> This is
good
Processed notification command: /path/sms.sh server333 OK  -> This is good

But for the other servers I get:

Processed notification command: /path/sms.sh server222 $SERVICESTATE$ ->
Only get the variable name instead its content, ok or critical.

Any idea what the problem could be?

Thanks in advance.
Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120816/7756c31e/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-------------- next part --------------
_______________________________________________
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