[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2013-01-04
1
Medium Priority
?
898 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

649 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