How to display all alarm receivers in the alarm email.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
o2401c
Posts: 4
Joined: Sun Dec 18, 2011 9:54 pm
Location: Beijing

How to display all alarm receivers in the alarm email.

Post by o2401c »

Hi,Experts,

As you know nagios alarm emails send one by one, how to add the all alarm receivers in the alarm CC list.( display all receivers in the one email.)
Thanks.
A new nagios user
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: How to display all alarm receivers in the alarm email.

Post by jsmurphy »

The only way I know of accomplishing this is to have all of their email addresses in a single contact definition, that is unless you wrote your own handler to do some magic.
o2401c
Posts: 4
Joined: Sun Dec 18, 2011 9:54 pm
Location: Beijing

Re: How to display all alarm receivers in the alarm email.

Post by o2401c »

Thanks. but base email groups,seems can't set like this. I want to some groups in CC list of email. email define is not good way, due to receiver always changes.
A new nagios user
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Re: How to display all alarm receivers in the alarm email.

Post by crfriend »

You may want to investigate the various macros that ara available to the notification plugins, specifically $CONTACTNAME$ and $CONTACTGROUPMEMBERS$. Note that if you are transmitting to a mailling list there is no way for Nagios to know who is subscribed to that list unless one writes another plugin to find that and stash it someplace that your notification plugin can get too it.
o2401c
Posts: 4
Joined: Sun Dec 18, 2011 9:54 pm
Location: Beijing

Re: How to display all alarm receivers in the alarm email.

Post by o2401c »

Thanks crfriend,

I tried these 2 micro, but nagios can't send emails to this members, due to only display in the memeber's name not email address. so the email can't send out.
but you let me find another way, put this 2 micro in the email content, then we can know who received this email. it is good way too.
Thanks.
A new nagios user
Locked