Notification Script

Subhendu Ghosh sghosh at sghosh.org
Wed Mar 9 23:09:27 CET 2005


On Wed, 9 Mar 2005, Don Alfredo wrote:

> On Wednesday 09 March 2005 19:33, Zaine wrote:
>> Hello,
>>
>> This might be a stupid question, but is it possible to change the
>> notification layout. I have setup nagios to send notifications via sms, and
>> when some of the non-it managers get the notification, the dont understand
>> "Plugin timeout". Is there anyway that I can change this output, or is it
>> hardcoded?
> - if they don't know what it is about, why derange their beauty sleep ? don't
> notify them.
> Still, you can create another notification just for them, and use that
> notification in their contact object.
> if your pager notification looks somewhat like this :
> -------------
> define command{
> command_name notify-by-sms
> command_line /usr/bin/sms_client -q $CONTACTPAGER$ '$NOTIFICATIONTYPE$:
> $HOSTNAME$: $SERVICEDESC$ is $SERVICESTATE$ ($OUTPUT$)'
> }
> define command{
> command_name host-notify-by-sms
> command_line /usr/bin/sms_client -q $CONTACTPAGER$ '$NOTIFICATIONTYPE$:
> $HOSTNAME$ is $HOSTSTATE$ ($OUTPUT$)'
> }
> ---------------
> create another notification for the "less gifted" :
>
> define command{
> command_name notify-by-sms-for-the-weenies
> command_line /usr/bin/sms_client -q $CONTACTPAGER$ 'your toy just broke, dial
> a techie'
> }
> define command{
> command_name host-notify-by-sms-for-the-weenies
> command_line /usr/bin/sms_client -q $CONTACTPAGER$ 'buffer overflow, three
> tech words follow and you can only handle two'
> }
> (or you may just leave out the $OUTPUT$ macro, so they'l only get the status
> without detail- more effective, less humorous)
> ----------
> define contact {
> 	contact_name				a-weenie
> 	host_notification_commands	host-notify-by-sms-for-the-weenies
> }
>
> you get the picture, right ?
> --------------
>

A beer for the man ! :)


-- 
-sg


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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