Dependencies!

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
kimjaggi
Posts: 44
Joined: Thu Apr 17, 2014 3:56 am

Dependencies!

Post by kimjaggi »

I want to setp notification for hosts and services but I want to notify as per the dependencies.
For example if the host is down tehn I dont want to get notifications from individual services. I should get only email that HOST is Down.

Anotehr example is, I have stack of 3 switches where switch 2 and 3 is connected with switch 1. So if switch 1 is down, it is ofcourse that 2 and 3 is down as well, so I shouldnt be notofied for that.

Any idea, how oculd this be configured?
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Dependencies!

Post by eloyd »

if the host is down tehn I dont want to get notifications from individual services. I should get only email that HOST is Down
Dependencies not required. Nagios does this for you. If the service is down, it checks the host. If the host is down, it assumes that all services on the host are down.
So if switch 1 is down, it is ofcourse that 2 and 3 is down as well, so I shouldnt be notofied for that
You want to define parents in your host configuration. If switch 1 is the parent of switch 2, then that means switch 1 must be up to be able to get to switch 2. So if switch 1 is down, Nagios won't even check switch 2.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Dependencies!

Post by scottwilkerson »

Thx Eric!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Dependencies!

Post by eloyd »

No problem. I figured after eight years or so, I should start answering questions and earn my Nagios Achievement Badge. :-)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Dependencies!

Post by sreinhardt »

Ah, going for some MVP are we? Nice to have you...back? :D

Back on topic, kim let us know if that works for you, eloyd is spot on though!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
kimjaggi
Posts: 44
Joined: Thu Apr 17, 2014 3:56 am

Re: Dependencies!

Post by kimjaggi »

Thanks for the reply.
You want to define parents in your host configuration. If switch 1 is the parent of switch 2, then that means switch 1 must be up to be able to get to switch 2. So if switch 1 is down, Nagios won't even check switch 2.
Could you please tell me how can I do this.. Or do we have any official documentation for this.

I checked online:-http://community.nagios.org/2009/08/23/ ... -required/

Do you think the info in this link is right?
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Dependencies!

Post by eloyd »

You really should bookmark the Nagios Core documentation:

http://nagios.sourceforge.net/docs/3_0

What you are looking for is the "parent" configuration field at http://nagios.sourceforge.net/docs/3_0/ ... .html#host
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Dependencies!

Post by tmcdonald »

Thank you eloyd as usual!
Former Nagios employee
kimjaggi
Posts: 44
Joined: Thu Apr 17, 2014 3:56 am

Re: Dependencies!

Post by kimjaggi »

Cool. Thanks for the help.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Dependencies!

Post by tmcdonald »

Is it safe to close this thread as solved?
Former Nagios employee
Locked