Why am I getting 'unreachable'-notifications for t

Hi all!

I have a couple of hosts in my config for which I receive unreachable-notifications, even though I’ve disabled it (I think…) in the config. Here is an example:

define  host {
host_name AP-1
alias AP_1
address 1.2.3.4
parents CB-1
hostgroups net5
check_command check-host-alive
max_check_attempts 3
check_interval 1
active_checks_enabled 1
passive_checks_enabled 0
check_period full-time
obsess_over_host 0
check_freshness 0
event_handler host-notify-by-sms
event_handler_enabled 1
flap_detection_enabled 0
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contact_groups Support5
notification_interval 0
notification_period office_hours
notification_options d,r
notifications_enabled 1
register 1
}
‘u’ is not in notification_options, as you can see. So why still the notifications…?



Have you tried using in host,cfg:
notify_unreachable 0

Also could it be coming from your contact.cfg setup? i.e

host_notification_options d,u,r

AFAIK definitions are to be considered as filters. So a notification contact setup d,u,r would mean unreachable notifications ARE sent to the user IF they are genereated. as opposed to a notificiation contact definiton of d,r where an unreachable notification would be filtered.

notify_unreachable 0 is bad if you have some hosts where you want to be notified for unreachability, which as i understand it is the case.

Still i don’t have a reasonable idea as to why it IS notifying. :frowning:

Luca

I suspect it’s due to your event handler and not due to notification logic. Your notification settings are correct and are NOT sending you a notification when that host is in the unreachable state. But, the host check does fail, it does go into state “unreachable” and your event handler kicks in, and does “host-notify-by-sms” which I am guessing, sends you a message via sms.
That event handler seems to be redundant, since notification logic can do the same thing, but even better, since they can be filtered.

notify_unreachable 0
can be declared on a single host basis right?

I don’t see that in the docs, so I would say no.
But as I stated, it’s not the notification logic that is his problem. It’s his eventhandler that is notifiing him.

never used eventhandlers so i will no teven try to guess.
But i used escalations successfully for sms alerting…

Luca

Luca - I use escalations for SMS notification but it cancels the e-mail? I want e-mail notification and SMS. Does your escalation do this?

Sorry to go away from the subject in hand

check the manual for escalations.
You can define what you want. we used to get the 4th notification by SMS

Luca



So because I have both notifications & event handler enabled I get the unreachable notifications? (Hmm, it would explain why I get quite some double notifications as well…)

But… If I disable the event handler, I’m not going to get any SMS-notification at all, right?
What would be the correct setup to get 1 (one) notifcation per unit, and preferably no unreachable-notifications for the units which have this disabled?
(the units with unreachable disabled are behind other units which DO have unreachable disabled, so I should get only 1 unreachable notification per branch instead of a whole shedload of them…)


“But… If I disable the event handler, I’m not going to get any SMS-notification at all, right?” No, not correct.

The script that you previously ran as the event handler could be the same exact script that you define in your contacts.cfg for the notification method. instead of using notify-by-email as the command, use notify-by-sms or whatever you want to call the script.
Disable the eventhandler, since you are not even using it as a “proactive method of fixing a problem” which is what eventhandlers are suppose to be for. Use notification logic for notifications. If you don’t want unreachable for a service failure, then don’t include the “u” in the notification_options for that service.