?
Solved

Nagios acknowledge email, how do I add the user acknowledging it to the email

Posted on 2013-01-04
1
Medium Priority
?
867 Views
Last Modified: 2013-09-03
Hello,

I'm trying to add the user name of the person acknowledging a service check. Right now if you acknowledge a check you get a email like this:

From: nagios@abc.com [mailto:nagios@abc.com]
Sent: Thursday, January 03, 2013 12:32 PM
To: Me
Subject: ACKNOWLEDGEMENT:Server-name/Ping Check is CRITICAL

T:Thu Jan 3 12:31:43 EST 2013
I:PING CRITICAL - Packet loss = 100%

I want it changed to add the last line:

From: nagios@abc.com [mailto:nagios@abc.com]
Sent: Thursday, January 03, 2013 12:32 PM
To: Me
Subject: ACKNOWLEDGEMENT:Server-name/Ping Check is CRITICAL

T:Thu Jan 3 12:31:43 EST 2013
I:PING CRITICAL - Packet loss = 100%
ACK by:User-acknowledging-this-check

In my /etc/nagio/commands.cfg i have:

define command {
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "T:$LONGDATETIME$\nI:$SERVICEOUTPUT$" | /bin/mail -s "$NOTIFICATIONTYPE$:$HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTEMAIL$
}

What would I add or am i looking in the wrong place?
0
Comment
Question by:knightdogs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 26

Accepted Solution

by:
pony10us earned 2000 total points
ID: 38745801
Try this:

See link http://nagios.sourceforge.net/docs/3_0/macrolist.html#notificationtype  .


In /etc/nagio/commands.cfg:

define command {
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "T:$LONGDATETIME$\nI:$SERVICEOUTPUT$" | /bin/mail -s "$NOTIFICATIONTYPE$:$HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTEMAIL$
“ACK by:User- $NOTIFICATIONAUTHOR$”
}
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sourc…
Curious about the latest ransomware attack? Check out our timeline of events surrounding the spread of this new virus along with tips on how to mitigate the damage.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question