Page 1 of 2
service parents
Posted: Sun Nov 03, 2013 8:11 am
by jvejv
Hi *
it seems that I don't understand the meaning of service parents. I configured service_B to have service_A as parent.
My expectation was that when service_A is critical, service_B should not be checked and should be reported as unreachable or unknown.
This does not happen: service_B is still checked and reported (and the result is false OK - but that's due to the way of checking: I actually
hoped to use service parents to get rid of these false readings).
What really service parents mean ?
And is there a way to (e.g.) stop checking all services on a host that is down (and report them as critical, unreachable or whatever) ?
Thanks for help, jvejv
Re: service parents
Posted: Mon Nov 04, 2013 11:47 am
by sreinhardt
Services do not have parents the way hosts do, they are dependent on the host the are under, and can have other service dependencies, which may be what you are referring to. Could you link to the documentation you are using, and possibly provide some configs that you are trying this on?
Re: service parents
Posted: Tue Nov 05, 2013 7:25 am
by jvejv
Thanks for the answer:
http://nagios.sourceforge.net/docs/nagi ... ncies.html speaks about
service dependencies. The picture there is beyond my understanding - I miss some table or some verbal description that
would tell that (e.g., following the first definition, and I think I read it wrong) if service D on host B is critical, service F
on host C is not tested and reported as unknown. The tip on the top of the page says that parent/child service relationship
is much simpler, and
http://nagios.sourceforge.net/docs/nagi ... ml#service says how
to configure it, but I couldn't find a description of what it really does - and I am not patient enough for experimenting.
What I need is (to start with) to stop checking a service on a host that is down and to report it as unknown or unreachable.
Thanks, jvejv
Re: service parents
Posted: Tue Nov 05, 2013 5:22 pm
by abrist
Service alerts should be suppressed when the host is down. Is your primary concern the availability reports for said services?
Re: service parents
Posted: Wed Nov 06, 2013 2:48 am
by jvejv
Not yet

- what I need now is that they're not reported as OK/green in the Nagios front panel.
Re: service parents
Posted: Wed Nov 06, 2013 2:23 pm
by scottwilkerson
jvejv wrote:Not yet

- what I need now is that they're not reported as OK/green in the Nagios front panel.
They still will not be reported as OK, if in fact they are down.
If a service has a parent and the parent is down, they should be marked as unreachable.
Re: service parents
Posted: Wed Nov 06, 2013 3:50 pm
by jvejv
They still will not be reported as OK, if in fact they are down.
They are checked and shown as OK - and that's what puzzles me. It clearly is a bad design of that service-check, but I'd
expect Nagios not to even attempt (correct or poorly designed) checks of services on a host that is down or unreachable.
If a service has a parent and the parent is down, they should be marked as unreachable.
That's the other point of my confusion: I know what is means that a host is down - its check_command returns a critical
value. I also know that a service has another service as a parent (although I'm not sure what it means) - cf.
http://nagios.sourceforge.net/docs/nagi ... ml#service. But I don't know
[*] how to set a host to be a parent of a service (is it the same as a service defined on that host ? in that case, my problem is
described above: services checked on a host that is down)
[*] or what it means that a service is down (does it mean critical ? in that case I had a similar problem: the parent is critical
but the child is still being checked and reported as OK).
Thanks for help, jvejv
Re: service parents
Posted: Wed Nov 06, 2013 3:54 pm
by scottwilkerson
jvejv wrote:how to set a host to be a parent of a service
This is automatic default behavior, if a host is down, you will not receive alerts for it's services.
With service parents, it is possible that the parent is down, but the child is still OK. What the service parents alows you to do is suppress alerts for child services if the parent is down.
Re: service parents
Posted: Wed Nov 06, 2013 4:10 pm
by jvejv
I see (I think): does it really mean that the services on a host that is down (or having a parent that is down) are
[*] checked
[*] the results of those checks is shown on the web front-panel of nagios
[*] and only the alerts are not sent out ?
Is there a way to stop checking and show them as unreachable or unknown or whatever ?
Thanks, jvejv
Re: service parents
Posted: Thu Nov 07, 2013 1:09 pm
by slansing
The services are still checked, what could be done is to implement an event handler that uses the external command "DISABLE_HOST_SVC_CHECKS" to disable the service checks until the host is back up.