service notification_options is not working

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ed48
Posts: 2
Joined: Wed Jan 30, 2019 8:33 am

service notification_options is not working

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: service notification_options is not working

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ed48
Posts: 2
Joined: Wed Jan 30, 2019 8:33 am

Re: service notification_options is not working

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: service notification_options is not working

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked