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
-------------------------------------------------------------------------
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/
_______________________________________________
Nagios-users mailing list
[email protected]
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