3 doubts on SMS alert system for Nagios : by kannel SMS gateway

Thomas Guyot-Sionnest dermoth at aei.ca
Sat Jan 3 05:48:16 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 30/12/08 08:36 AM, KK CHN wrote:
> Hi all ;
> 
> I followed this tutorial
> http://www.nagiosexchange.org/cgi-bin/pages/Detailed/1855.html
> 
> [...]
> 
> define command{
>         command_name    service_notify_with_sms
>         command_line    $USER1$/notify_sms -a   MY_MOBILE_NUMBER    -u  
> MY_USER_NAME    -p
> MY_PASSWORD -m \ '$NOTIFICATIONTYPE$:$HOSTNAME$ is $SERVICESTATE$
> ($SERVICEOUTPUT$)\' -t $CONTACTPAGER$
> }
> 
> 
> I have 3 doubts  
> 
> doubt 1) is the above configuration correct ?
> 
> [...]

I don't know about this tool, so all I can suggest is to dead the doc...

> doubt 2  ) why I have to add again  the following  config section ? i
> mean the purpose of the following lines ?
> 
> define command{
> 
> |      command_name    host_notify_with_sms
>       command_line    /usr/lib/nagios/plugins/notify_sms -a 1012345 -u myusername_for_gw -p mypassword_for_gw -m \'$NOTIFICATIONTYPE$: $HOSTNAME$ is $HOSTSTATE$ ($HOSTOUTPUT$)\' -t $CONTACTPAGER$
> 
> 
> |
> 
> }

One is for service and the other for host notification, as some macros
differs. The host one (above) seems OK, but in the service one (top of
email) seems to be missing the service name macro: you will know that
something is WARNING/CRITICAL/UNKNOWN about a service of your host but
it won't tell you which service it is... which is usually kind of useful. :)

> 
> doubt 3)   if I added the 2  define command sections   in commands.cfg  
> as in the website  , can I get an sms alert ?anything else  I have to
> add in localhost.cfg   ? (where I have services to check    
> ssh,ping,http   in the localhost . )

Don't forget to use the commands above in your contact definitions for
host and service alerts. If you wish to receive emails as well, you will
need the contacts twice (one for email and one for alerts). You can also
play with the notification options; for instance I receive all
WARNING/CRITICAL/OK/DOWN/UP alerts on email, but only CRITICAL/DOWN on
pager, so I don't wake up in the middle of the night for something that
doesn't require immediate attention.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJXu4Q6dZ+Kt5BchYRAp7ZAJ4lIN87ZAKVOdt9dtfXOJfci8PiMwCdG4bQ
CxyBSh4GG2Dx0F0U4hHUGRY=
=Qu2J
-----END PGP SIGNATURE-----

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