Dependent service checks don't fail when depended-on service check fails
Andreas Ericsson
ae at op5.se
Thu Mar 26 09:57:09 CET 2009
Jarrod Moore wrote:
> Hello everyone,
>
> I have a couple of related questions regarding service dependencies in
> Nagios and their limitations. I have two service checks (let's call
> them A and B) and service A depends on service B to function
> correctly. I want to set Nagios up so that if service B crashes then
> both services A and B are put into the critical state in Nagios. I've
> tried using service dependencies in Nagios to represent this behaviour
> but have yet to be successful. I can only get it to suppress
> notifications of service A if both services go down.
>
This is expected behaviour. If A is truly dependant on B, then A will
turn into a non-ok state of its own volition rather than as a result
of any dependency magic. Dependencies are designed as a means of
suppressing notifications. Otherwise, you would *always* get a
notification for B first, and a minute or so later from A (actually,
without the dependency you could get from A first).
> Is there a way to do what I'm trying to do here? I'd have thought it
> would be logical that if a service depends on another service and the
> service depended on dies then all services depending on it would fail
> their checks as well, but there;s probably some scenario where it
> doesn't work so well. I've had a look through the mailing list
> archives and found someone had asked a similar question to the
> nagios-devel list about 2.5 years ago and didn't end up getting an
> answer, so I thought I might ask whether solutions to this type of
> problem had been developed since then.
>
They haven't. You're using dependencies the wrong way, really. If
A is truly dependent on B and doesn't go into a non-ok state after
B has crashed, then your check isn't doing what it's supposed to do,
or you've misunderstood the relationship somehow.
If you were to explain what the two services actually are, it would
be easier to point you to a solution that works.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
------------------------------------------------------------------------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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
More information about the Users
mailing list