Hi. This may belong in NagiosCore but since I have XI....
1) What is the macro/variable name to call a host's parent host?
2) What's the best way to get Nagios to run a check (event handler? script?) before sending "RECOVERY" emails for a child and if the host's $LASTHOSTSTATE$ == "UNREACHABLE" [and it's parent's $LASTHOSTSTATE$ == "DOWN"], to skip sending the "RECOVERY" notification and retry the check again at the next check interval. otherwise, it can send the "RECOVERY" email.
Background:
I inherited a chatty Nagios system and I'm working to clean it up. I assigned parents to my hosts which took care of the unwanted "DOWN" notifications for the child hosts. However, the "RECOVERY" emails are not working as needed.
When a child host goes "UNREACHABLE" because it's parent is "DOWN", I do not need or want 25+ "RECOVERY" emails from the child hosts when the parent comes back up. I need 1 "RECOVERY" email. From the parent host. Otherwise it's confusing to the system owners.
However, disabling all the "RECOVERY" emails for the child is not a viable option. If the child goes "DOWN" on it's own, I most certainly want a "RECOVERY" alert for that.
What I can do to fix this?
Here's the requested system info:
Linux Distro CentOS 6.3
32 or 64bit? 64-bit
VMware or Manual? VMware XI Appliance
Is Gnome installed? No
Are you using a proxy? Yes
Are you using SSL? Yes
Nagios XI Version 5.5.2
Thanks for your help!
Allison
Parent/Child "Recovery" Notifications
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Parent/Child "Recovery" Notifications
Actually there was an issue in 5.5.2 that prematurely sent recovery notifications. This was resolved in 5.5.4
Re: Parent/Child "Recovery" Notifications
As far as I know, you would be still receiving recoveries (from the "UNREACHABLE" state) for the children hosts. Unfortunately, it is not possible to change the logic as there is no "parent" macro available.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Parent/Child "Recovery" Notifications
I understand that there is no built-in logic to address this issue, but there must be someway to script it, right?
Re: Parent/Child "Recovery" Notifications
Most probably, this is something that can be scripted, however it is out of scope for Nagios support.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Parent/Child "Recovery" Notifications
Why would Event Handlers be out of scope?
Re: Parent/Child "Recovery" Notifications
I am sorry I was not clear enough. Event Handlers are not out of scope, however writing a custom event handler for users is. It is up to you to write the code and make it work. We will do our best to help you out in case you get stuck on something (have a specific question), while trying to implement it.
Be sure to check out our Knowledgebase for helpful articles and solutions!