Email notifications. Unsupported macro???
Posted: Tue Jan 03, 2012 2:44 pm
Dear Nagios users,
I am running a Groundwork Monitoring server on top of Nagios Core 3.2.3. I want to use the notification option so that a notification contact is used when a host state has changed.
I'm using the Sendemail script on Linux which has to use the $CONTACTEMAIL$ macro to use the e-mail address(es) of the notification contacts.
The problem is that the script can't read the macro. It can however, read a e-mail address.
-t $CONTACTEMAIL$ = Jan 03 15:42:11 gwositp sendEmail[29801]: Error: "-" is not a recognized option!
-t [email protected] = Jan 03 15:43:08 gwositp sendEmail[30388]: Message input complete.
Jan 03 15:43:10 gwositp sendEmail[30388]: Email was sent successfully!
Is there any fix for the...what it seems like...unsupported macro?
I am running a Groundwork Monitoring server on top of Nagios Core 3.2.3. I want to use the notification option so that a notification contact is used when a host state has changed.
I'm using the Sendemail script on Linux which has to use the $CONTACTEMAIL$ macro to use the e-mail address(es) of the notification contacts.
The problem is that the script can't read the macro. It can however, read a e-mail address.
-t $CONTACTEMAIL$ = Jan 03 15:42:11 gwositp sendEmail[29801]: Error: "-" is not a recognized option!
-t [email protected] = Jan 03 15:43:08 gwositp sendEmail[30388]: Message input complete.
Jan 03 15:43:10 gwositp sendEmail[30388]: Email was sent successfully!
Code: Select all
/usr/bin/printf "%b" "<html> Host: $NOTIFICATIONTYPE$ : <b>$HOSTSTATE$</b><br>Datum: <b>$LONGDATETIME$</b><br>Host: <b>$HOSTALIAS$ ($HOSTADDRESS$)</b></b><br><br>Note: You are getting this e-mail because there was a state change of the host. Please refer to the Groundwork server for the actual problem.<br><br><b>$HOSTOUTPUT$</b></html>" | /usr/local/groundwork/common/bin/sendEmail -s $USER13$ -xu $USER14$ -xp $USER15$ -f $ADMINEMAIL$ -t $CONTACTEMAIL$ -u Groundwork ITP