An email on acknowledge, and onlyonacknowledge? Nagios and RT
Nathan Oyler
noyler at khimetrics.com
Tue Jul 26 22:05:35 CEST 2005
> > > It's easy enough to write your handler so that no email is
> > sent unless
> > > the message type is ACKNOWLEDGEMENT.
> > >
> > It is? I was unaware of that. I will reread the documentation
> > and try to
> > get a grasp on this.
> >
>
> Here's a possibility:
>
> misccommands.cfg
>
> # 'notify-RT-ticket-host'
> define command{
> command_name notify-RT-ticket-host
> command_line [ "$NOTIFICATIONTYPE$" = "ACKNOWLEDGEMENT" ]
&&
> /usr/bin/printf "%b" "***** OPERATOR ACKNOWLEDGEMENT *****\n\nAn
operator
> has acknowledged this HOST problem and a HelpDesk ticket has been
> automatically generated\n\nDETAILS\n\nHost: $HOSTNAME$\nState:
> $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time:
> $DATETIME$\n" | /bin/mail -s "$HOSTSTATE$ - $HOSTNAME$!"
$CONTACTEMAIL$
> }
>
> A cleaner solution might be to put all your notification logic in a
> seperate
> script and just pipe arguments to the script. The script can then
decide
> which variables it wants to use, what channel to send notifications
> through,
> and how to format the message for each channel.
>
[Nathan Oyler]
That's what I will do, put all of the notification logic in a separate
script, and call that.
Thank you very much for your help.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&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