Page 1 of 2

If host reboots or goes down suppress service Notifications

Posted: Fri Jun 22, 2018 3:01 am
by nagiosEngie
Hello Nagios Crew,
I am unabl to find this info:
is it possible to tell Nagios not to send service alerts when host goes down or reboots.

Can you help?

Thanks
sandro

Re: If host reboots or goes down suppress service Notificati

Posted: Fri Jun 22, 2018 9:15 am
by scottwilkerson
This is the default behavior

Re: If host reboots or goes down suppress service Notificati

Posted: Fri Jun 22, 2018 9:20 am
by nagiosEngie
Hello,
well then I think I have a problem because when I reboot my hosts all checks on services will give me an CRITICAL event ora an UNKNOWN event instead of jus giving me the host DOWN.

Where is this set?
Do I have to define the hosts as parent of the services associated to it?
if true, How is this done?
Thanks
Sandro

Re: If host reboots or goes down suppress service Notificati

Posted: Fri Jun 22, 2018 9:27 am
by scottwilkerson
Can you send you profile.zip form Admin -> System Profile along with the name of the host that rebooted and the service that alerted?

Re: If host reboots or goes down suppress service Notificati

Posted: Mon Jun 25, 2018 3:43 am
by nagiosEngie
HEllo Attached the profile.zip
I have also noticed that I never get the hostdown hostup notification.

SAndro

Re: If host reboots or goes down suppress service Notificati

Posted: Mon Jun 25, 2018 7:14 am
by scottwilkerson
scottwilkerson wrote:along with the name of the host that rebooted and the service that alerted?
I need the name of the host that went down

Re: If host reboots or goes down suppress service Notificati

Posted: Wed Jun 27, 2018 5:25 am
by nagiosEngie
Hello,
I found out the issue is connected to the check interval we are using which is 5min.
Nearly all servers we have reboot nearly all under 3 min.
I poll (ping for up/down) the server at time T0,
while waiting for the next check at T5, the server reboots at T2.
The nagios server dose a service check (for example) at T3.
The server is still rebooting and I will receive a UNKNOWN notification for the service (agent and Nagios server are not communicating, agent is still not up)
Server starts at T4 (about 4 min to reboot).
I get the OK for all the UNKNOWN notifications.

You can see the sequence in the attached image.
Attached also an updated system profile file.

Thanks
SAndro

Re: If host reboots or goes down suppress service Notificati

Posted: Wed Jun 27, 2018 6:52 am
by scottwilkerson
So for many of these services you have set the amount of retries before alerting to 2

this means it checks every 5 minutes + 1 minute for the retries, potentially the service could be sending notifications at 3 minutes in.

I would strongly suggest polling the hosts more frequently (every 5 minutes) and setting max_check_attempts to 5 on the services.

This would force the hosts to have checked at least 1 time before a service notification can go out.

These settings would be the default in the Wizards.

Re: If host reboots or goes down suppress service Notificati

Posted: Wed Jun 27, 2018 8:07 am
by nagiosEngie
Hi Scott,
I have reduced the polling time on hosts (ie ping up/down) to 2 minutes and services are checked every 5min. retry is set to 2 and retry time to 1 min.
I am just a bit worried about the 2 min polling on host (ie ping up/down). Can this be too stressful for the server?
We have around 200 hosts with a predicted size of 500. There is arount 9 services per Host ( this is an avarage value)
We have at the moment a VM with 8 cvcpu and 8 gb of ram.
Thanks
SAndro

Re: If host reboots or goes down suppress service Notificati

Posted: Wed Jun 27, 2018 8:42 am
by scottwilkerson
nagiosEngie wrote:Hi Scott,
I have reduced the polling time on hosts (ie ping up/down) to 2 minutes and services are checked every 5min. retry is set to 2 and retry time to 1 min.
I am just a bit worried about the 2 min polling on host (ie ping up/down). Can this be too stressful for the server?
We have around 200 hosts with a predicted size of 500. There is arount 9 services per Host ( this is an avarage value)
We have at the moment a VM with 8 cvcpu and 8 gb of ram.
Thanks
SAndro
These ping checks should not be too stressful at all, they are very light weight. However, even if the hosts were polling hosts at 5 minutes you wouldn't run into the issue.

You should be in good shape, and I doubt you will see any difference in system load