Solved

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

Posted on 2013-01-04
1
747 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
1 Comment
 
LVL 26

Accepted Solution

by:
pony10us earned 500 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now