Page 1 of 2
Nagios alerts when host has SERVICE DOWNTIME?
Posted: Mon Apr 19, 2021 4:51 pm
by ITOMB_IMT
Hi,
Currently we are using Nagios XI 5.8.1. Today while working, i have scheduled a host and its associated services in downtime, but Nagios alerted on that host. I verified the configuration and its look. I verified Event log and notifications report, i see only entry of host in scheduled downtime but i dont see any information about alerts. When i check /var/log/messages i see the entry of both host in scheduled downtime and alerts.
My question is Nagios isn't supposed to send alerts when host is in downtime, but i received why?
Thanks
Re: Nagios alerts when host has SERVICE DOWNTIME?
Posted: Tue Apr 20, 2021 1:29 pm
by vtrac
Hi,
I tested this on my Nagios XI and it seems to worked fine.
I started out by select "schedule a down time for services for this host" as showed in picture below.
T1.png
As you can see, my test is for all services but not the host itself, which I know I will get a email notification when I take the host down.
Yes, at the start of my scheduled time, I got an email alert that said:
Code: Select all
A period of scheduled downtime for this service was started
T2.png
As expected, I also received an email warning for the "host" (since I did not scheduled the host, but just services):
Code: Select all
***** Nagios XI Alert *****
Nagios has detected a problem with this host.
Notification Type: PROBLEM
Host: 192.168.23.63-ncpa
State: DOWN
So, here's my summary:
Code: Select all
Down time started:
- Got email notification at the start of the scheduled down time for all services.
- Got email warning that "host" is down (as expected, since I did not schedule for the "host", only "services").
Down time completed:
- Received email notification that services has come out of a period of scheduled downtime.
- Received email notification that "host" has recovered (as expected).
Can you please upload snapshot of the email notification?
Also, can you please take snapshot and upload your settings of the "host" and all "services"?
Please also upload your "profile.zip" if you need me to take a look at your config.
Best Regards,
Vinh
Re: Nagios alerts when host has SERVICE DOWNTIME?
Posted: Tue Apr 20, 2021 4:13 pm
by ITOMB_IMT
Hi,
i scheduled Downtime on host at 11:48 AM on host1 along with its service core_file_check at 11:48 AM for 2 hours, but i received alert at 12:11 PM. Please see the email from Nagios.
***** Nagios XI Alert *****
Nagios has detected a problem with this service.
Notification Type: PROBLEM
Service: Core_file_check
Host: host1
Address: xx.xx.xx.xx
State: CRITICAL
Info:
(No output on stdout) stderr: connect to address xx.xx.xx.xx port 5666: No route to host
Date/Time: 2021-04-19 12:11:23
I have sent a PM with Nagios profile, please have a look.
Thanks,
Re: Nagios alerts when host has SERVICE DOWNTIME?
Posted: Wed Apr 21, 2021 10:09 am
by vtrac
Hi,
Sorry, but I have not receive the "profile.zip" file in my PM inbox.
Questions:
Did you receive email notification at the start of the scheduled down time for your host1 and core_file_check service?
Did you also received email notification that host1 and core_file_check services has come out of a period of scheduled downtime?
I'm sorry but I am not able to reproduce the issue here.
May I ask that you upgrade to the latest Nagios XI (v5.8.3), then test the down time again?
Best Regards,
Vinh
Re: Nagios alerts when host has SERVICE DOWNTIME?
Posted: Thu Apr 22, 2021 4:13 pm
by ITOMB_IMT
Sorry, the PM wasn't sent earlier. i have sent Profile now. Please have a look.
As we have recently upgraded to Nagios V 5.8.1, upgrade to 5.8.3 is a long procedure in our organization and not a easy thing.
I haven't configured host/service to receive alerts for start/stop of scheduled downtime. But i have received alerts when host/service is in downtime.
Re: Nagios alerts when host has SERVICE DOWNTIME?
Posted: Thu Apr 22, 2021 4:37 pm
by vtrac
Hi,
When you ONLY just scheduled for HOST down, then all services are still consider as monitored.
If you do not want to alert for all of its services, you must also schedule down time for ALL its services as well.
Th3.png
Best Regards,
Vinh
Re: Nagios alerts when host has SERVICE DOWNTIME?
Posted: Fri Apr 23, 2021 2:51 pm
by ITOMB_IMT
i have scheduled all the services as well in downtime.
log entry for service into schedule downtime and alerts.
Apr 19 11:48:41 nagios_server nagios: HOST DOWNTIME ALERT: host1;STARTED; Host has entered a period of scheduled downtime
Apr 19 11:48:41 nagios_server nagios: SERVICE DOWNTIME ALERT: host1;Core_file_check;STARTED; Service has entered a period of scheduled downtime
Apr 19 12:11:57 nagios_server nagios: SERVICE ALERT: host1;Core_file_check;CRITICAL;HARD;1;CHECK_NRPE STATE CRITICAL: Socket timeout after 30 seconds.
Apr 19 12:13:25 nagios_server nagios: SERVICE ALERT: host1;Core_file_check;OK;HARD;1;OK - No core file exists on host1
Apr 19 12:13:25 nsc-stg-maost-nagiosapp-01 nagios: GLOBAL SERVICE EVENT HANDLER: host1;Core_file_check;OK;HARD;1;xi_service_event_handler
Re: Nagios alerts when host has SERVICE DOWNTIME?
Posted: Mon Apr 26, 2021 10:40 am
by vtrac
Hi,
I looked inside the "objects.cache" and did not see "host1" defined.
However, I did see lots of services for "Core_file_check".
One thing I noticed is that all the "Core_file_check" serviced are defined with "is_volatile = 1".
The case for using is_volatile with active checks is if you want each non-OK check
Code: Select all
- the non-OK service state is logged
- contacts are notified about the problem (if that's what should be done). Note: Notification intervals are ignored for volatile services.
- the event handler for the service is run (if one has been defined)
Here's the KB for volatile services:
https://assets.nagios.com/downloads/nag ... vices.html
Best Regards,
Vinh
Re: Nagios alerts when host has SERVICE DOWNTIME?
Posted: Mon Apr 26, 2021 3:54 pm
by ITOMB_IMT
so when the service is configured "is_volatile = 1" and scheduled in downtime, Will i get email for the service if non-ok state?. If a service is scheduled in downtime, am not supposed to receive an email irrespective of what state the service is in.
Thanks,
Re: Nagios alerts when host has SERVICE DOWNTIME?
Posted: Tue Apr 27, 2021 12:11 pm
by vtrac
Hi,
Yes, I am agreeing with you that when host/service in downtime, no notification should be sent out.
However, I am not able to re-produce it here from my VM.
I also set "is_volatile=1" as well.
Hope you don't mind testing it again on your system.
This time, please make sure all services have the "message" icon displayed as showed in picture below.
T1.png
Please upload screenshots, if you can.
Best Regards,
Vinh