Acknowledgment Alerts

Tedman Eng teng at dataway.com
Thu Jan 19 23:56:04 CET 2006


One way to acheive this is to process notifications using a script instead
of a long one-liner.  The script can contain any sort of logic you desire,
including filtering on $NOTIFICATIONTYPE$ macro.
http://nagios.sourceforge.net/docs/2_0/macros.html#notificationtype

# 'notify-by-email' command definition
define command{
        command_name    notify-by-email
        command_line    /usr/local/bin/notify.sh  $NOTIFICATIONTYPE$
$SERVICEDESC$ $HOSTALIAS$ $HOSTADDRESS$ $SERVICESTATE$ $DATETIME$ $OUTPUT$
$SERVICESTATE$ $CONTACTEMAIL$
        }


pseudocode for notify.sh:
--------------------------
NOTIFICATIONTYPE=$1
SERVICEDESC=$2 etc...

if NOTIFICATIONTYPE="Acknowledgement"
    do (create ticket)
       (email CONTACTEMAIL)
elseif NOTIFICATIONTYPE="Problem|Recovery"
    do (email CONTACTEMAIL)
--------------------------


-----Original Message-----
From: Tom Healy [mailto:thealy at nortom.com]
Sent: Thursday, January 19, 2006 2:10 PM
To: Nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Acknowledgment Alerts


If I understand the docs correctly, the only notifications that can be set
are: u,d,r,f correct?  Which one of those does the Acknowledgement Alert
emails fall into?  I'd like to be able to send just these Ack messages to a
trouble ticket system to automatically fill out the ticket based on the user
who ack's the alert.  Is this even possible?


IE:
Subject: ** ACKNOWLEDGEMENT alert - SSH on foobar.com is CRITICAL **


Sends to trouble ticket system and a script will parse the email & fill in
the data of the ticket. 


My reasoning is that I don't want every alert to create tickets, just when
someone is working on it.  I'm thinking this is not possible with the normal
alert notifications.  Is this something that event_handler can do?  


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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