Page 1 of 1
Nagios doesn't send out notification HARD to HARD
Posted: Wed Oct 04, 2017 1:49 pm
by paulol
Nagios doesn't send out notification to service HARD to HARD when the notification_interval is 0.
Example:
OK - SOFT
OK -> UNKNOWN - HARD
UNKNOWN -> CRITICAL - HARD
define service {
host_name IZMIR
service_description SMC_SRBV_SAMSUNG_SL-M4080
check_command check_printer!SEC84251908715E!!!!!!!
max_check_attempts 2
check_interval 5
retry_interval 5
check_period xi_timeperiod_24x7
event_handler_enabled 0
flap_detection_enabled 0
process_perf_data 1
notification_interval 0
notification_period xi_timeperiod_24x7
notification_options w,c,r
notifications_enabled 1
contacts Equipe_Printers,Jira
_IC CMDB-214392
_INCIDENTE 33
_REQUISICAO 32
_TIPOCHAMADO CMDB-27
register 1
}
Could you help me?
Re: Nagios doesn't send out notification HARD to HARD
Posted: Wed Oct 04, 2017 3:50 pm
by npolovenko
@paulol, Are you running Nagios XI or Nagios Core? Becuase on the XI it's not recommended to manually change the config files. Instead, go to the web interface then /configure/core configuration manager/services/ (then click on the service that you want to edit). There you can change alert and check_settings.
Here's more info on how to do this.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: Nagios doesn't send out notification HARD to HARD
Posted: Wed Oct 04, 2017 5:21 pm
by paulol
I'm running on Nagios XI. I've just have sent the file configuration to be easier to understand.
notification_interval: This directive is used to define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable. Unless you've changed the interval_length directive from the default value of 60, this number will mean minutes. If you set this value to 0, Nagios will not re-notify contacts about problems for this host - only one problem notification will be sent out
If i set the interval notification to 1 i going to send out notification every 1 minute and I don't want to sent out notification every 1 minute, i just want to send 1 single time.
Re: Nagios doesn't send out notification HARD to HARD
Posted: Wed Oct 04, 2017 5:43 pm
by mcapra
So your notification options are set up like so:
Which means you will get a notification for WARNING, CRITICAL, and RECOVERY states. 2 of those states are "problem" states: WARNING and CRITICAL.
So when the documentation for notification_interval says this:
If you set this value to 0, Nagios will not re-notify contacts about problems for this host - only one problem notification will be sent out
That means, when notification_interval is set to 0, you will only get a single notification for the initial problem state. So in a scenario like this:
Code: Select all
OK -> WARNING -- Notification sent
WARNING -> CRITICAL -- NO Notification sent
You do not get a WARNING -> CRITICAL notification because the previous OK -> WARNING state change counts as a "problem" state. Meaning the second problem state, WARNING -> CRITICAL, will not send a notification since a problem state has already occurred (OK -> WARNING) and a notification has been dispatched.
It could bounce between WARNING and CRITICAL until the end of time; Unless the status for your checks is purged, a new notification will not be sent out. I believe your check would need to return to an OK state first (a non-problem state) before Nagios would even consider sending another notification.
I think, anyway. I'd have to look at the code to verify.
Re: Nagios doesn't send out notification HARD to HARD
Posted: Wed Oct 04, 2017 5:55 pm
by paulol
I got it. So, should i consider to use event handler?
Re: Nagios doesn't send out notification HARD to HARD
Posted: Thu Oct 05, 2017 2:39 pm
by dwhitfield
For now. I was thinking there was a feature request for this, but I didn't see it in my search. You can file at
https://github.com/NagiosEnterprises/nagioscore/issues