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:
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.
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.
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.
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.