Page 1 of 2
Disabling service alerts when host is down
Posted: Tue Jun 02, 2015 9:30 am
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?
Re: Disabling service alerts when host is down
Posted: Tue Jun 02, 2015 9:51 am
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.
Re: Disabling service alerts when host is down
Posted: Tue Jun 02, 2015 10:01 am
by ssax
lmiltchev wrote:You can disable flapping globally by setting:
[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".
Re: Disabling service alerts when host is down
Posted: Tue Jun 02, 2015 2:22 pm
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."
Re: Disabling service alerts when host is down
Posted: Tue Jun 02, 2015 2:53 pm
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
Re: Disabling service alerts when host is down
Posted: Thu Jun 04, 2015 10:23 am
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.
Re: Disabling service alerts when host is down
Posted: Thu Jun 04, 2015 10:33 am
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?
Re: Disabling service alerts when host is down
Posted: Thu Jun 04, 2015 11:52 am
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.
Re: Disabling service alerts when host is down
Posted: Tue Jun 09, 2015 5:49 pm
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?
Re: Disabling service alerts when host is down
Posted: Tue Jun 09, 2015 7:06 pm
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