Hi all !!!
Just started as a Nagios user so I am new on the list.
I have nagios running and I also have a basic structure in place for
sending SMS'es ( using smstools ). I need to expand it now because I have
many people that want to be notified of only selected system information.
At this point in time, all contacts are sent ALL information.
So , bottom line is, I need to diffrentiate based on $USERNAME$ as defined in
my contacts.
define command{
command_name notify-by-sms
command_line /usr/local/nagios/libexec/send_sms $HOSTNAME$ $HOSTSTATE$ $USERNAME
}
And then in ../libexec , my "send_sms"-script looks as follows: ( This is how it looks CURRENTLY )
#!/bin/bash
HOST = $1
STATE = $2
../sms/smstools/scripts/sendsms 0821111111 "$HOST $STATE"
../sms/smstools/scripts/sendsms 0822222222 "$HOST $STATE"
[ entry for each cell-number ]
I would like to make use of $USERNAME$ to control what gets sent to who.
But, when I print the contents of $USERNAME$ in the script, it is either blank or
it contains "-".
I do have all my contacts defined in my ../minimal.cfg file
OS = CentOS4.0
Nagios 2.4
smstools 2.2.4
a Pointer would be much appreciated ???
Thanks !
John Longland
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Nagios-users mailing list Nagios-users@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