Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature-request] Notification recipients #55

Closed
wh1test opened this issue Jun 24, 2015 · 8 comments
Closed

[feature-request] Notification recipients #55

wh1test opened this issue Jun 24, 2015 · 8 comments

Comments

@wh1test
Copy link

wh1test commented Jun 24, 2015

This reature was discussed here: http://support.nagios.com/forum/viewtopic.php?f=20&t=33430
In large companies will be very useful to know how recieved this notify except you: are you alone or not?
IT managers receives e-mail notifications about bussines-critical services and they want to know how will be invloved to reslove problem.
Could you please add to Nagios Core macro, that can be used for notification in the same way as $CONTACTNAME$ or $CONTACTGROUPMEMBERS$?

@tmcnag
Copy link
Contributor

tmcnag commented Jun 24, 2015

To clarify, an appropriate name for the macro might be $NOTIFIEDCONTACTS$ which could be a comma-separated list of contact aliases, names, or emails. Possibly three macros, one for each.

@scottwilkerson
Copy link
Contributor

@tmcnag
Copy link
Contributor

tmcnag commented Jun 24, 2015

That's just the shortname though, doesn't list the email or full name. I think that was the intention.

@scottwilkerson
Copy link
Contributor

But once you have the shortname you can get the other info

e.g.
$CONTACTEMAIL:john$
$CONTACTNAME:john$

http://nagios.sourceforge.net/docs/nagioscore/4/en/macros.html

@scottwilkerson
Copy link
Contributor

Or,

$CONTACTEMAIL:contactgroup_name:,$
$CONTACTNAME:contactgroup_name:,$

@tmcnag
Copy link
Contributor

tmcnag commented Jun 24, 2015

Did not know about the delimiter trick, thanks! So to take it a step further, could this be done?

$CONTACTEMAIL:$CONTACTGROUPNAME$:,$

In other words, can you use one macro to build up another on-demand macro? I would imagine this would break the parsing of the dollar signs a bit and leave you with:

$CONTACTEMAIL:$

and

$:,$

@wh1test
Copy link
Author

wh1test commented Jun 24, 2015

Thank you guys! It works!

@scottwilkerson
Copy link
Contributor

Perfect! But to answer @tmcnag question, Yes, on the command line for the command, something like the following with backticks should work:

$CONTACTEMAIL:`echo $CONTACTGROUPNAME$`:,$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants