Not quite.  You still have to list each host explicitly.  I am interested in the case where you know that service1 is dependent on service2 on the individual hosts of hostgroup1.  I want to be able to express this servicedependency relationship without needing to list each and every host in the hostgroup.<br>
<br><div class="gmail_quote">On Thu, Mar 19, 2009 at 4:05 PM, Andy Shellam <span dir="ltr"><andy-lists@networkmail.eu></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I'm sure this has been implemented in Nagios 3.  I wrote an on-line<br>
application that generated service dependencies for individual<br>
hosts/services in a group in Nagios 2, and I'm sure I read that was now<br>
no longer an issue in v3.<br>
<br>
 From the manual -<br>
<a href="http://nagios.sourceforge.net/docs/3_0/objecttricks.html#same_host_dependency" target="_blank">http://nagios.sourceforge.net/docs/3_0/objecttricks.html#same_host_dependency</a>:<br>
<br>
"If you want to create service dependencies for multiple services that<br>
are dependent on services on the same host, leave the<br>
/dependent_host_name/ and /dependent_hostgroup_name/ directives empty."<br>
<br>
Is this what you were trying to achieve?<br>
<br>
Andy<br>
<div class="im"><br>
Paul Fitzpatrick wrote:<br>
> I agree (if I understand your request correctly) that it would be<br>
> *extremely* useful to have a config directive that effectively allows<br>
> you to say, 'in hostgroupX make serviceY depend on serviceZ on the<br>
> individual host itself'  as opposed to making it dependent on serviceZ<br>
> on all the other hosts of hostgroupX.<br>
><br>
> I have a script I run prior to running a config check that expands the<br>
> host member list of hostgroups with service dependencies and then<br>
> populates the servicedependency definition with the relevant<br>
> hostnames, but it's a hack with obvious drawbacks.<br>
><br>
> An ex colleague of mine wrote a patch for v2.0 that defined a 'SELF'<br>
> directive that enabled defining servicedependencies as I described.<br>
> Unfortunately I am not a C programmer, so I wasn't able to duplicate<br>
> it for v3, so I wrote the perl script.<br>
><br>
> I hope the enhancement will be considered<br>
><br>
> Paul<br>
><br>
> On Wed, Mar 18, 2009 at 8:14 AM, Michael Maymann <<a href="mailto:michael@maymann.org">michael@maymann.org</a><br>
</div><div><div></div><div class="h5">> <mailto:<a href="mailto:michael@maymann.org">michael@maymann.org</a>>> wrote:<br>
><br>
>     Hi List,<br>
><br>
>     Is there a way to solve my problem with the following<br>
>     servicedependency config:<br>
>     <a href="http://forums.meulie.net/viewtopic.php?f=59&t=4606" target="_blank">http://forums.meulie.net/viewtopic.php?f=59&t=4606</a><br>
>     <<a href="http://forums.meulie.net/viewtopic.php?f=59&t=4606" target="_blank">http://forums.meulie.net/viewtopic.php?f=59&t=4606</a>><br>
><br>
><br>
>     ---<br>
>     I'm using Nagios 3.0.6 with nrpe.<br>
>     I'm about to setup NRPE service dependencies and would like to<br>
>     know the best way to do this.<br>
><br>
>     for a test i have configured the below and it works great, and i<br>
>     could "just" make these servicedependencies for every host.<br>
>     # NRPE dependencies<br>
>     define servicedependency{<br>
>     host_name host1<br>
>     # hostgroup_name hostgroup1<br>
>     service_description NRPE<br>
>     dependent_host_name host1<br>
>     # dependent_host_name $HOSTNAME$<br>
>     dependent_service_description Current Users,Free Space,HW<br>
>     info,Health,High CPU Load,Log file,NFS client stats,NTP<br>
>     stratum,Pdflush Processes,RAID,Swap Space,Temps,Zombie Processes<br>
>     execution_failure_criteria w,u,c,p<br>
>     notification_failure_criteria w,u,c,p<br>
>     }<br>
><br>
>     My only problem is that we have ---A LOT--- of hosts so this is<br>
>     not an option :-)<br>
>     I am aware of the -u option to check_nrpe but a combination of<br>
>     only running some checks once every day and automated<br>
>     powermanagement makes this no option either.<br>
>     It would be nice if i somehow could get the functionality of the<br>
>     commented lines:<br>
>     # hostgroup_name hostgroup1<br>
>     # dependent_host_name $HOSTNAME$<br>
>     so for each host in hostgroup1 all the "dependent_service_<br>
>     descriptions" services are dependent on NRPE in this specific host.<br>
>     so if "hostgroup1" contains host1 and host2, "Current Users" on<br>
>     host1 will be dependent on NRPE on host1 but not dependent on NRPE<br>
>     on host2...<br>
><br>
>     Is there a way to do this or do i need to make a hack and/or put<br>
>     an entry in the wishlist ?<br>
>     ---<br>
><br>
><br>
>     Thanks in advance<br>
>     ~Maymann<br>
><br>
>     ------------------------------------------------------------------------------<br>
>     Apps built with the Adobe(R) Flex(R) framework and Flex<br>
>     Builder(TM) are<br>
>     powering Web 2.0 with engaging, cross-platform capabilities.<br>
>     Quickly and<br>
>     easily build your RIAs with Flex Builder, the Eclipse(TM)based<br>
>     development<br>
>     software that enables intelligent coding and step-through debugging.<br>
>     Download the free 60 day trial. <a href="http://p.sf.net/sfu/www-adobe-com" target="_blank">http://p.sf.net/sfu/www-adobe-com</a><br>
>     _______________________________________________<br>
>     Nagios-devel mailing list<br>
>     <a href="mailto:Nagios-devel@lists.sourceforge.net">Nagios-devel@lists.sourceforge.net</a><br>
</div></div>>     <mailto:<a href="mailto:Nagios-devel@lists.sourceforge.net">Nagios-devel@lists.sourceforge.net</a>><br>
<div class="im">>     <a href="https://lists.sourceforge.net/lists/listinfo/nagios-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-devel</a><br>
><br>
><br>
</div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">><br>
> ------------------------------------------------------------------------------<br>
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are<br>
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and<br>
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development<br>
> software that enables intelligent coding and step-through debugging.<br>
> Download the free 60 day trial. <a href="http://p.sf.net/sfu/www-adobe-com" target="_blank">http://p.sf.net/sfu/www-adobe-com</a><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Nagios-devel mailing list<br>
> <a href="mailto:Nagios-devel@lists.sourceforge.net">Nagios-devel@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/nagios-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-devel</a><br>
><br>
<br>
------------------------------------------------------------------------------<br>
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are<br>
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and<br>
easily build your RIAs with Flex Builder, the Eclipse(TM)based development<br>
software that enables intelligent coding and step-through debugging.<br>
Download the free 60 day trial. <a href="http://p.sf.net/sfu/www-adobe-com" target="_blank">http://p.sf.net/sfu/www-adobe-com</a><br>
_______________________________________________<br>
Nagios-devel mailing list<br>
<a href="mailto:Nagios-devel@lists.sourceforge.net">Nagios-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-devel</a><br>
</div></div></blockquote></div><br>