MACRO PROBLEM

Khurram Malik malik_khurram at hotmail.com
Thu Feb 18 16:17:59 CET 2010


Thanks Patrick

 

But how can i provide the name of contact group when it depends upon the service or host which is triggering the event. Is there a way that i can provide contact group dynamically to CONTACTGROUPMEMBERS ?

 

e.g $CONTACTEMAIL:CONTACTGROUPMEMBERS:,"

 

which can give me comma separated list of emails associated with that perticular service or host?

 

or if there is any ready made script for Nagios and Netcool integration?

Regards

Khurram Malik




 
 


 
> Date: Wed, 17 Feb 2010 23:48:08 -0800
> From: patrick.morris at hp.com
> To: malik_khurram at hotmail.com
> CC: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] MACRO PROBLEM
> 
> Morris, Patrick wrote:
> > Khurram Malik wrote:
> > 
> >> Hi
> >> 
> >> I am using Nagios 3.0.6 and in an integration project i want Nagios to 
> >> send alerts to Netcool. I am using Host/Service Global Event Handlers. 
> >> I am able to get the maximum information via the following macros
> >> 
> >> $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $SERVICEDESC$
> >> 
> >> But i also want some other info via macros and i am using the 
> >> following link to see if macro is enabled or disabled
> >> http://nagios.sourceforge.net/docs/3_0/macrolist.html#hostoutput
> >> 
> >> I want to get CONTACTEMAIL and CONTACTPAGER contents but these macros 
> >> are disabled with Global Host/Service handler, what is the easiest way 
> >> to get info for the conact macros with Global Event Handlers. I can 
> >> see $_CONTACTGROUPMEMBERS$_ is enabled with Global Event Handlers but 
> >> I am unable to get any value, seems like a bug.
> >> 
> >
> > This is not a bug. These macros are not available with event handlers, 
> > since eventhandlers do not have contacts associated with them. If you 
> > look at the matrix on tha page you linked, you'll see that CONTACTEMAIL 
> > and CONTACTPAGER work only with host and service notifications.
> > 
> 
> After re-reading your original question, I may have misunderstood, and 
> you're wondering why
> 
> $CONTACTGROUPMEMBERS$ doesn't work.
> 
> See notes 5 and 7 on the page you linked. These macros work as on-demand-macros in event handlers, since event handler have no contacts associated with them. To obtain a list of conatct group members in that contacts, you would also need to provide the name of the group.
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100218/a2b6edd6/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs 
proactively, and fine-tune applications for parallel performance. 
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
-------------- next part --------------
_______________________________________________
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