Disabling service alerts when host is down

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Disabling service alerts when host is down

Post by cfgriffith »

From what I have gathered through reading various posts on the forum by default if a host is down service alerts for that host are disabled. Unless flap detection is specified for those services and hosts. Is that correct? I also noticed all of my alert setting seem to be inheriting from somewhere. The service checks all have skip set and so does the host and I can't find any settings from the host group. Where would they be inheriting the flap detection setting from so perhaps I could turn that off globally?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Disabling service alerts when host is down

Post by ssax »

Notifications will be surpressed if the host goes down but the services will still try to be checked. With flap detection enabled, if the host/service is flapping Nagios will suppress notifications.

Edit the host/service and click "Manage Templates", view the templates that are assigned to them, this is most likely where they are inheriting from. The template that it's using may have a parent template that it's inheriting from, just follow it until you find where it's being set.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Disabling service alerts when host is down

Post by ssax »

lmiltchev wrote:You can disable flapping globally by setting:

Code: Select all

enable_flap_detection=0
[in your /usr/local/nagios/etc/nagios.cfg] and restarting nagios.

...or you can do it from the GUI by clicking on the "x" (Disable) action button next to "Flap Detection" under the "Monitoring Engine Status/Monitoring Engine Process".
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Re: Disabling service alerts when host is down

Post by cfgriffith »

So my use case is I have a device that has a lot of services on it. I want to setup a dependency that if a service fails, before sending an email check, it will check the host. If the host check is failing it will just send a notification about that check.

Is this doable? One of my colleagues was talking about nagios core and thinks it is possible in there.

"To reduce the email clutter for the modbus alerts, choose one service (could be as simple as check_tcp against the modbus port) and then create service dependencies for all other modbus services against that service check."
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Disabling service alerts when host is down

Post by lmiltchev »

"To reduce the email clutter for the modbus alerts, choose one service (could be as simple as check_tcp against the modbus port) and then create service dependencies for all other modbus services against that service check."
This is totally doable. To create a new service dependency, go to the CCM->Service Dependencies->Add New

If you are unsure of a setting, at any time when you are on the "Service Dependency Management" page, you can select an item from the "Help & Documentation" drop-down menu and view the usage.

Also, review the Nagios Core documentation about host/service dependencies here:

http://nagios.sourceforge.net/docs/nagi ... ncies.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Re: Disabling service alerts when host is down

Post by cfgriffith »

Alright thanks. I will let you know if I have any questions or if we can go ahead and close the ticket. Should get back to you in a day or so.
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Re: Disabling service alerts when host is down

Post by cfgriffith »

Okay so I am trying to create a Service Dependency. I add the services that are dependent under "Manage service dependencies" and then add the host they are dependent on being up under "Manage hosts" When I try to save said changes I get this:

Must define at least 1 service for a valid service dependency definition.

Does that mean I have to add a service for the dependent services to rely on as well or am I just missing something?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Disabling service alerts when host is down

Post by ssax »

You need to add a service in there for the other services to be dependent on.

For example you could have a PING or another check that is on the host with a lower check_interval than the other services and then the other services would depend on to know if it's up or down.

Services can be dependent on services, hosts can be dependent on hosts.
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Re: Disabling service alerts when host is down

Post by cfgriffith »

Okay but you can't have a service be dependent on a host? Or this is the default setup is that service is tied to said host?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Disabling service alerts when host is down

Post by Box293 »

cfgriffith wrote:Okay but you can't have a service be dependent on a host? Or this is the default setup is that service is tied to said host?
That is correct, you can't have a service be dependent on a host, thats just how nagios works.

FYI here is a thread talking about a new feature request which removes the need for dependencies:

http://support.nagios.com/forum/viewtop ... 40#p140739
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked