This is one way of filtering out false positives. If your goal is to only reduce the amount of notifications you receive then your current configuration should work fine for this as ideally you would want your hosts to go into a hard state before your services do, and subsequently, silence the service alerts and send a hard state notification.UNREACHABLE States and Notifications
By default, Nagios will notify contacts about both DOWN and UNREACHABLE host states. As an admin/tech, you might not want to get notifications about hosts that are UNREACHABLE. You know your network structure, and if Nagios notifies you that your router/firewall is down, you know that everything behind it is unreachable.
If you want to spare yourself from a flood of UNREACHABLE notifications during network outages, you can exclude the unreachable (u) option from the notification_options directive in your host definitions and/or the host_notification_options directive in your contact definitions.
External Commands Logic.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: External Commands Logic.
Have you considered excluding unreachable hosts from your notification options within each one:
Re: External Commands Logic.
Yes I have thought about excluding unreachable hosts from the notifications, but in the end we need to know when hosts are unreachable.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: External Commands Logic.
It really sounds like the only reasonable way to do what you are asking is to setup something like the following:
Environments A and B
XI servers A and B in respective environments
A monitors and notifies for all devices in the A env and also monitors without notification devices in the B network
B monitors and notifies for all devices in the B env and also monitors without notification devices in the A network
When A notices that B's nagios server is down notifications are enabled for the B site on the A server. However to avoid duplicate messages A also has proper parent child relationships so that if the router is also noticed as down you should only get notifications for the router and maybe a couple more until it goes into a hard state.
B has the inverse setup from A regarding monitoring and parent child relationships.
While this setup is not perfect, it is about the best we can think of without custom development. Also maybe I am incorrect, but it seems like this is pretty much constantly changing with regard to your requirements. I would be better if we could get a solid idea in one post of what you are looking to do, then stick with that until something is implemented.
Environments A and B
XI servers A and B in respective environments
A monitors and notifies for all devices in the A env and also monitors without notification devices in the B network
B monitors and notifies for all devices in the B env and also monitors without notification devices in the A network
When A notices that B's nagios server is down notifications are enabled for the B site on the A server. However to avoid duplicate messages A also has proper parent child relationships so that if the router is also noticed as down you should only get notifications for the router and maybe a couple more until it goes into a hard state.
B has the inverse setup from A regarding monitoring and parent child relationships.
While this setup is not perfect, it is about the best we can think of without custom development. Also maybe I am incorrect, but it seems like this is pretty much constantly changing with regard to your requirements. I would be better if we could get a solid idea in one post of what you are looking to do, then stick with that until something is implemented.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: External Commands Logic.
That is exactly what I am trying to accomplish.
Will the parent child relationships handle it?
I would prefer not having a plethora of unreachable alerts.
What about after the situation is dealt with?
I need it to resume the environment it had before any servers went down, automatically.
Will the parent child relationships handle it?
I would prefer not having a plethora of unreachable alerts.
What about after the situation is dealt with?
I need it to resume the environment it had before any servers went down, automatically.
Re: External Commands Logic.
You will not receive alerts for unreachable children of an unreachable/down parent. Only the parent will be alerted.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: External Commands Logic.
samuel wrote:What about after the situation is dealt with?
I need it to resume the environment it had before any servers went down, automatically.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: External Commands Logic.
Again, this is done automatically, if the parents are up it will alert on the children if they are down
Re: External Commands Logic.
Thank you for answering my problem. This thread can be closed.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: External Commands Logic.
Closing as resolved.