Additional Fields in Notifications

Zac Israel zac at corenap.com
Tue Jun 15 21:38:47 CEST 2004


We were used to this same mechanism, to fix I did a simple edit to misccommands.cfg and resource.cfg, the changes are :

resource.cfg:
$USER2$=`grep $HOSTNAME$ /opt/nagios/var/customer/Info` # where I store the info I want to include

misccommands.cfg:
define command{
  command_name    host-notify-by-email
  command_line    /usr/bin/printf "%b" "***** Nagios 1.0 *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $DATETIME$\nNotes:$USER2$" | /usr/bin/mailx -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}

Hope this helps.

Zac

On Tue, Jun 15, 2004 at 11:33:28AM -0500, Marc Powell wrote:
> > Greets all
> > 
> > When replacing WhatsUp with Nagios, I neglected to check for a
> > certain functionality that some of my staff rely on.  Currently in
> > WhatsUp, there are "Notes" fields which contain text, we use them to
> > store contact information on sites; ie circuit numbers, contact phone
> > numbers, etc.    
> > We're all paged with this information and need not logon to a PC to
> > look this information up; its just handy. 
> > 
> > I've come up with only one solution; to recode check_ping to parse a
> > txt file for a site name and include the site information whenever a
> > return is WARN or CRIT.  Before I went out coding this, I wanted to
> > see if anyone had any bright ideas on how to email out extra fields
> > per host.    


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
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