Page 1 of 3
Delayed Notification
Posted: Tue May 19, 2020 12:41 pm
by dslaughter
I've got something wrong and can't find it. Notifications work except when I set a delay. If I set a delay I never get a notification. If I turn off delay and set it back to notify immediately it returns to the correct behavior.
I set the delay by going to core config manager and then configure service. I go to alert tab and set First notification delay to a number like 5 or 15.
I never get the delayed notification.
Any ideas about what I need to check?
Re: Delayed Notification
Posted: Tue May 19, 2020 3:53 pm
by jbrunkow
Have you applied the configuration since you made the change? You can do so by navigating to the Apply Configuration page from the Core Config Manager > and then clicking Apply Configuration on that page.
Can you please post a picture of all the settings in your Alert Settings tab on the Service Management page for that service?
What kind of check are you trying to delay? Does this happen when you try to perform any kind of check, or just on this one service?
Re: Delayed Notification
Posted: Wed May 20, 2020 8:21 am
by dslaughter
The configuration is applied. To be honest you couldn't be paying attention if you didn't see the red button and messages saying apply configuration.
I've done passive and active checks and neither is sending a notification after first notification delay is set
nagiosCheckScreen.docx
Re: Delayed Notification
Posted: Wed May 20, 2020 3:17 pm
by jbrunkow
We might want to have a look at the
nagios log for around the time to see what is going on with that check. Ideally, you could
tail the log, then run the test, then
Ctrl + C to kill the process tailing the log.
We could also inspect how the
first_notification_delay is set for that service. Theoretically, this is how
XI would delay the notification.
OBJECT DEFINITIONS
The object definition for that service may be in the following folder.
You may also want to make sure that the time is synced for all clocks involved. If you navigate to the
Admin section of
XI > click
System Settings under
System Config on the left pane > and you can see the
Timezone Settings under the
General tab.
Re: Delayed Notification
Posted: Wed May 20, 2020 5:06 pm
by dslaughter
I went through nagios.log and found the event but nothing about a delay or notification. Also there are no service notifications in the log for this event.
I checked service config and it looked ok to me.
Code: Select all
define service {
host_name da1-stp
service_description STP
use xiwizard_passive_service
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 15
first_notification_delay 5
notification_period xi_timeperiod_24x7
contacts nagiosadmin
contact_groups admins
stalking_options n,
_xiwizard passivecheck
register 1
}
I've never had to manually edit a config file since I started using nagiosxi.
All clocks are sync'd using ntp to UTC.
Let me know if you see an error in the config above.
Re: Delayed Notification
Posted: Thu May 21, 2020 1:31 pm
by jbrunkow
It looks like some other people are also having issues with delaying passive checks. Please see
topic 58682.
So the issue here is that notification delays expect at least one more trap to come in(at least 15 minutes later) to be triggered. Without that the notification will not occur.
What we can do is use the freshness check to force a second check X seconds later where X is the notification delay. The freshness check will run check_dummy with the $SERVICESTATEID$ and $SERVICEOUTPUT$ macros which will have the values from the initial passive snmp trap.
The logic here can be a bit hard to understand, but apparently
Nagios does not send a notification for passive checks. Please see the
Nagios core documentation for more details.
first_notification_delay: This directive is used to define the number of "time units" to wait before sending out the first problem notification when this host enters a non-UP state. 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 start sending out notifications immediately. If this directive is used notifications will be sent out after the next check is performed following the first_notification_delay time. If you set this value to 0, Nagios will start sending out notifications immediately.
CORE DOCS
Re: Delayed Notification
Posted: Tue May 26, 2020 7:08 am
by dslaughter
This seems like a bug with a workaround. Is there a bug tracker for this? This feature doesn't work correctly so I hope someone is addressing it. I need this functionality.
Re: Delayed Notification
Posted: Tue May 26, 2020 7:09 am
by dslaughter
The notification delay doesn't work for active or passive checks. All is broken. i'm on version 5.6.12.
Re: Delayed Notification
Posted: Tue May 26, 2020 11:29 am
by lmiltchev
Can you show us an example of an active check that is failing for you? We will try to recreate the issue in house. Thanks!
Re: Delayed Notification
Posted: Tue May 26, 2020 12:25 pm
by dslaughter
What exactly to do you need to see? The only thing I do to an existing service that is working as desired is set the first notification delay to 5m. When this service check fails no notification is ever sent. I just want to make sure I send you what you need.