Page 1 of 1

Can't change service notification

Posted: Mon Jul 22, 2013 1:33 pm
by vmesquita
I am trying to change service notification from
/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTNAME$ - $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
to
/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTNAME$ - $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$LONGSERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
But I always get a configuration error... Could you please check what's wrong?

Re: Can't change service notification

Posted: Mon Jul 22, 2013 1:35 pm
by slansing
What is the exact error you are receiving? Also, it is advisable to use both types of output next to each other like so:

Code: Select all

$SERVICEOUTPUT$ $LONGSERVICEOUTPUT$

Re: Can't change service notification

Posted: Mon Jul 22, 2013 1:36 pm
by abrist
Go to --> Configure --> Core Config Manager --> Write Config Files. Click "write" and then "verify". Post the results here in code wraps.

Re: Can't change service notification

Posted: Mon Jul 22, 2013 3:37 pm
by vmesquita
I rebooted the machine and it started working. Thanks for all replies.