Nagios doesn't send out notification HARD to HARD

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Nagios doesn't send out notification HARD to HARD

Post 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?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios doesn't send out notification HARD to HARD

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Nagios doesn't send out notification HARD to HARD

Post 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.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Nagios doesn't send out notification HARD to HARD

Post by mcapra »

So your notification options are set up like so:

Code: Select all

notification_options            w,c,r
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.
Former Nagios employee
https://www.mcapra.com/
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Nagios doesn't send out notification HARD to HARD

Post by paulol »

I got it. So, should i consider to use event handler?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios doesn't send out notification HARD to HARD

Post 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
Locked