Missing Macro: $SERVICECONTACTGROUPS$

Caylan Van Larson caylan at mac.com
Thu Mar 20 20:54:22 CET 2008


Our contact group names are modeled after exchange distribution  
lists.  Sometimes notifications are sent to multiple lists (service  
desk, dev team, oracle team).  I need the notification emails to  
include the short names of the other contact groups (hence  
distribution list names) configured for the service.  I understand  
that this is not a guarantee that a notification will be sent to all  
groups (since they could have different notification options).

To my surprise Nagios 3 does not include this macro.

$SERVICECONTACTGROUPS$ - "A comma separated list of the short names  
taken from the contact_groups directive of the service definition."

In the meantime I can use this ugly hack inside a script to get the  
list of contact-groups fit for emailing:

	grep "$SERVICEDESC" ~nagios/var/objects.cache -B 1 -A 3 | grep  
$HOSTADDRESS -A 5 | grep contact_groups | awk '{print $2}'

Thoughts?

---

Caylan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080320/b24970b1/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- 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