Acknowledge emails

Jason Gauthier jgauthier at lastar.com
Fri Jan 13 16:40:32 CET 2006


> >   I've been using nagios for quite a while.  I've 
> customized some of 
> >my notifications to fit better on our pagers.  Somehow, somewhere, 
> >sometime acknowledgement emails stopped sending the 
> acknowledgemnt comment with
> >it.    I cannot figure out which place it is I need to put 
> this back in.
> >(Maybe this was a change during a nagios upgrade even).  I'm 
> just not 
> >certain.
> >  
> >
> I think I know what you are talking about. I have written my 
> own notification script that is called the following way:
> [...]/mailer.py [...] -a $NOTIFICATIONTYPE$  -s $SERVICESTATE$ [...]
> 
> I had discovered (I was using 2.0b2 in the first place) that 
> sometimes my script received no value for its -a argument so 
> I had written somewhere in the script the following quick fix:
> 
>     # Nagios has a feature/bug that makes it send mails 
> without the PROBLEM or RECOVERY action
>     # flag. Hence the -a option comes with no argument, which 
> contradicts the check done below.
>     if parameters['-a'] is not None and 
> len(parameters['-a'])==0 and parameters['-s'] is not None and 
> len(parameters['-s']):
>         if parameters['-s'][0] in ('CRITICAL','WARNING','DOWN'):
>             parameters['-a'].append('PROBLEM')
>             logfile.write('Guessing the -a PROBLEM argument \n')
>         elif parameters['-s'][0] in ('OK','UP'):
>             parameters['-a'].append('RECOVERY')
>             logfile.write('Guessing the -a RECOVERY argument \n')

I'm not sure if that's the same or not.   Since I just had the luxury of
acknowledginh a host problem I can elaborate a little.

I went into the web interface and hit acknowledge.  I put in "jg" for
user and "This host is down." in the comment.

When I received the email it looks like this:

============================
***** Nagios  *****

Notification Type: ACKNOWLEDGEMENT
Host: Camera
State: DOWN
Address: 192.168.70.34
Info: CRITICAL - Plugin timed out after 10 seconds

Date/Time: Fri Jan 13 10:37:03 EST 2006
=============================

Under info, it used to say "This host is down.".  Perhaps even included
my username. I can't remember if that was the case or not.  This is
functionality I'm wanting to get back!

Jason



-------------------------------------------------------
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://ads.osdn.com/?ad_idv37&alloc_id865&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