Patch for minimal.cfg.in

Mike Schilli m at perlmeister.com
Mon Mar 20 04:28:29 CET 2006


Here's a patch for nagios/sample-config/template-object/minimal.cfg.in:
The latest version uses the macro 'OUTPUT' instead of 'HOSTOUTPUT' and
'SERVICEOUTPUT' for email notifications, causing emails to be sent out
without detailed info.

Patch attached.

-- Mike

Mike Schilli
m at perlmeister.com
-------------- next part --------------
Index: minimal.cfg.in
===================================================================
RCS file: /cvsroot/nagios/nagios/sample-config/template-object/minimal.cfg.in,v
retrieving revision 1.6
diff -a -u -r1.6 minimal.cfg.in
--- minimal.cfg.in	11 Aug 2005 01:06:02 -0000	1.6
+++ minimal.cfg.in	20 Mar 2006 03:21:45 -0000
@@ -58,7 +58,7 @@
 
 define command{
 	command_name	notify-by-email
-	command_line	/usr/bin/printf "%b" "***** Nagios @VERSION@ *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | @MAIL_PROG@ -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
+	command_line	/usr/bin/printf "%b" "***** Nagios @VERSION@ *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | @MAIL_PROG@ -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
 	}
 
 
@@ -67,7 +67,7 @@
 
 define command{
 	command_name	host-notify-by-email
-	command_line	/usr/bin/printf "%b" "***** Nagios @VERSION@ *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | @MAIL_PROG@ -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
+	command_line	/usr/bin/printf "%b" "***** Nagios @VERSION@ *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | @MAIL_PROG@ -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
 	}
 
 


More information about the Developers mailing list