Is contactgroup_name accessible as a macro for notifications?

Andreas Ericsson ae at op5.se
Thu Nov 8 12:23:05 CET 2007


Tom Yates wrote:
> On Thu, 8 Nov 2007, Andreas Ericsson wrote:
> 
>> Check the docs. The macro documentation is extensive. Or try and find 
>> out.
> 
> Thank you for that.  I did the former before posting;


I love you. No really, I do :P


> the only contact 
> macros defined are $CONTACT{NAME,ALIAS,MAIL,PAGER,ADDRESSn}$.  It's 
> certainly possible that the macro exists, but isn't classed as a contact 
> macro; that said, no other macro documented in /docs/macros.html seems 
> to fit.
> 

Then it doesn't exist.

> What I was asking is whether anyone's aware of an undocumented way to 
> access the parameter, or of some other clever end-run that hasn't 
> occurred to me.  Or, admittedly, whether I've missed something obvious.
> 

You could read it from <nagios-root>/var/objects.cache if you like. It
could be expensive to do an exhausive search there, so you might want to
cache the info somewhere.

Whatever way you choose, I believe you need to write the notification
command as a script instead of a one-liner in your commands.cfg.

If you have to fiddle an awful lot with it, you might be better off
just patching Nagios to understand a $CONTACTGROUPS$ macro or some
such.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list