As a template object, it would be very useful to have the capability within a servicedependency definition to be able to express without explicitly listing host_name(s) the following dependency relationship:<br><br>make service A depend on service B on only self-same host, of hostgroup X<br>
<br>It might look something like this:<br><br>define servicedependency {<br><br> service_description service B<br> dependent_service_description service A<br> dependent_hostgroup hostgroup X<br>
host_name SELF<br><br>}<br><br>Currently it appears that the only way to do this is to list explicitly all of the hostnames where this type of service dependency is desired (leaving off the dependent_hostgroup line). Having the SELF keyword (or some equivalent mechanism) would greatly simplify the use of a template object to define this kind of dependency.<br>
<br>I have written a perl-script to expand the members of the dependent_hostgroup using the objects.cache file as the source<br>for the hostgroup members to populate this type of servicedependency definition with the relevant host_name(s). It has the obvious deficiency that it depends on an exiting running configuration, and will not include newly-added hosts from a config that's been updated since the last restart.<br>
<br>A former collegue has written a nagios patch to do just this for an old release of nagios (2.01a). We have moved to version 3.0, so the patch is no longer useable.<br><br>I can supply my script and/or the 2.01a patch if there is interest.<br>
<br>Paul<br><br><br>