Page 1 of 1

service notification_options is not working

Posted: Wed Jan 30, 2019 8:58 am
by ed48
Hi

The Nagios Core 4.3.4.
We want to receive the notification only for CRITICAL states, and implemented notification_options c,r .
However we receive also WARNINGS notifications, which is not as per documentation.

Has Anyone seen this before, are we missing anything?

Thanks in advance.

Code: Select all

define service {
    use                     generic-service
    host_name               host1
    service_description     service1: check1
    check_command           check_1! -s 1800 -i blah
    max_check_attempts      1
    check_interval          5
    retry_interval          3
    check_period            p1-24x7
    notifications_enabled   1
    notification_interval   0
    notification_period     p1-24x7
   notification_options    c,r
    event_handler_enabled   1
    event_handler           notify-by-sms
}

From the log
[1548724445] SERVICE EVENT HANDLER: host1;service1: check1;WARNING;HARD;1;notify-by-sms

Re: service notification_options is not working

Posted: Wed Jan 30, 2019 9:09 am
by scottwilkerson
This is an event handler not a notification. you should remove these

Code: Select all

    event_handler_enabled   1
    event_handler           notify-by-sms
Then add contacts to receive notifications

Re: service notification_options is not working

Posted: Thu Jan 31, 2019 9:55 am
by ed48
scottwilkerson wrote:This is an event handler not a notification. you should remove these

Code: Select all

    event_handler_enabled   1
    event_handler           notify-by-sms
Then add contacts to receive notifications
Good point! Thank you!
Works as intended now, thanks a lot!

Regards
Ed

Re: service notification_options is not working

Posted: Thu Jan 31, 2019 10:12 am
by scottwilkerson
ed48 wrote:
scottwilkerson wrote:This is an event handler not a notification. you should remove these

Code: Select all

    event_handler_enabled   1
    event_handler           notify-by-sms
Then add contacts to receive notifications
Good point! Thank you!
Works as intended now, thanks a lot!

Regards
Ed
Excellent!

Locking thread