modifying acknowledgement emails

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

modifying acknowledgement emails

Post by JohnFLi »

I tried modifying the message that goes out when an acknowledgement so that we can see WHO acknowledgement.

Code: Select all

/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\n$CONTACTNAME$ said: $SERVICEACKCOMMENT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
But it seems that everytime somebody does ack. a message..... It puts my name in it.

ANy idea how I need to do this?
Everybody is somebody else’s weirdo
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: modifying acknowledgement emails

Post by tgriep »

In your command, you would want to use this Macro
$SERVICEACKAUTHOR$
In place of
$CONTACTNAME$

Code: Select all

    /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\n$SERVICEACKAUTHOR$ said: $SERVICEACKCOMMENT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: modifying acknowledgement emails

Post by JohnFLi »

works great, thank you
Everybody is somebody else’s weirdo
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: modifying acknowledgement emails

Post by tgriep »

That is good to hear. I'll close the port for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked