On Friday 10 Feb 2017 at 15:54, Horatiu N wrote:

> I've had this issue posted to this mailing list some months ago, and the
> reply I received was that the dependencies that a service has to it's
> parent host are automatically created.
> 
> So, what definitions would anybody need to create ?

Well, from the docs: "A service can depend on a host, and vice versa. A 
service has an implicit dependency (parent) to its host. A host to host 
dependency acts implicitly as host parent relation. When dependencies are 
calculated, not only the immediate parent is taken into account but all 
parents are inherited."

So, yes, there is an implicit dependency between a service and the host it 
runs on.

If you want a service dependency (ie: you are making something conditional on 
some other service check, rether than host check): "The parent_host_name and 
parent_service_name attributes are mandatory for service dependencies, 
parent_host_name is required for host dependencies. Apply rules will allow you 
to determine these attributes in a more dynamic fashion if required."

However in response to the original question, "If the dependency should be 
triggered in the parent object's soft state, you need to set 
ignore_soft_states to false."

So, since the OP was asking about inhibiting based on soft state as well as 
hard, this needs to be set (and isn't automatic) as well.


Antony.

> On 2/10/2017 3:44 PM, Antony Stone wrote:
> > On Friday 10 Feb 2017 at 13:29, Jorge Ferrando wrote:
> >> Hi Antony
> >> 
> >> I already read that before but I don't see how that can solve my
> >> problem. Can you clarify it?
> > 
> > "If the dependency should be triggered in the parent object's soft state,
> > you need to set ignore_soft_states to false."
> > 
> > Have you done that?
> > 
> >> I guess that also applies for icinga2 and that's exactly the problem.
> >> Host is DOWN but SOFT so I don't get any notification. But that makes
> >> the service DOWN and HARD so I immediately get a notification for every
> >> service in the host. That's what I want to avoid.
> > 
> > Maybe you should show us the dependency definitions you've created for an
> > example host/service, so we can see where you're starting from.
> > 
> > 
> > Antony.

-- 
This space intentionally has nothing but text explaining why this space has 
nothing but text explaining that this space would otherwise have been left 
blank, and would otherwise have been left blank.

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to