Page 2 of 2

Re: Notifications not being sent

Posted: Thu May 28, 2020 5:04 pm
by BanditBBS
Thanks,

I will test that out in the next day and let you know my findings!

Re: Notifications not being sent

Posted: Fri May 29, 2020 9:06 am
by BanditBBS
That doesn't seem to make any difference. My service went bad middle of the night, was in non OK state for 3.5 hours and every 5 minutes received a new passive result saying the service is not running on the remote host. No notifications were triggered.

Re: Notifications not being sent

Posted: Fri May 29, 2020 10:09 am
by cdienger
Here is what my test service looks like in /usr/local/nagios/var/objects.cache:

Code: Select all

define service {
        host_name       1.2.3.4
        service_description     Security Alert
        check_period    xi_timeperiod_24x7
        check_command   check_dummy!0!"No data received yet."
        contacts        nagiosadmin
        notification_period     xi_timeperiod_24x7
        initial_state   o
        importance      0
        check_interval  1.000000
        retry_interval  1.000000
        max_check_attempts      1
        is_volatile     1
        parallelize_check       1
        active_checks_enabled   0
        passive_checks_enabled  1
        obsess  1
        event_handler_enabled   1
        low_flap_threshold      0.000000
        high_flap_threshold     0.000000
        flap_detection_enabled  0
        flap_detection_options  a
        freshness_threshold     0
        check_freshness 0
        notification_options    a
        notifications_enabled   1
        notification_interval   0.000000
        first_notification_delay        15.000000
        stalking_options        n
        process_perf_data       1
        retain_status_information       1
        retain_nonstatus_information    1
        _XIWIZARD       passivecheck
        }
Do you see the entries in the nagios.log? You may need to enable the stalking option under the alert settings if the passive results are not unique. I'd be curious to see if it logging a notification or not.

For example, here is the log from a test I just ran:

Code: Select all

[1590763651] SERVICE ALERT: 1.2.3.4;Security Alert;CRITICAL;HARD;1;test1
[1590763678] SERVICE ALERT: 1.2.3.4;Security Alert;CRITICAL;HARD;1;test2
[1590764258] SERVICE ALERT: 1.2.3.4;Security Alert;CRITICAL;HARD;1;test3
[1590764380] SERVICE ALERT: 1.2.3.4;Security Alert;CRITICAL;HARD;1;test4
[1590764494] SERVICE ALERT: 1.2.3.4;Security Alert;CRITICAL;HARD;1;test5
[1590764524] SERVICE ALERT: 1.2.3.4;Security Alert;CRITICAL;HARD;1;test6
[1590764537] SERVICE ALERT: 1.2.3.4;Security Alert;CRITICAL;HARD;1;test7
[1590764557] SERVICE NOTIFICATION: nagiosadmin;1.2.3.4;Security Alert;CRITICAL;xi_service_notification_handler;test8
[1590764557] SERVICE ALERT: 1.2.3.4;Security Alert;CRITICAL;HARD;1;test8