Hello,
I've deleted my previous post as it had messy name. The thing I'm trying to resolve is not the dependency issue, but child/parent issue
Dear community and devs, I need some advice how to solve such an issue.
I've got a situation like this:
_______________GW1 (nagios default GW)
________________|
Nagios --- SW1 --- SW2 --- SW3 --- SW5 --- Host
______________________|
_____________________SW4
______________________|
GW2 (host defalt GW)-----|
How do I solve the child/parent issue here? The monitored host considered to be down if either L2 switches in the Nagios line OR GW2 or switches in GW2 line are down...
There is VLANs divided common L2 infrastructure.
If I set the SW5 as the parent for Host, Nagios won't report any issues, when the GW2 or SW4 will be Down, which means Host is not accessible also.
If I set the GW2 as the parent for Host, Nagios won't report any issues, when the SW5 or some switches before it in the line will be Down, which means the Host is not accessible also.
It's like same L2 but different L3 for that host.
How does the Parent logic works is it OR or AND?
Nagios goes to the Host by this way:
Nagios - SW1 -SW2 - GW1 - GW2 - SW4 - SW5 - Host
All the switches are in the same mgmt subnet, which is terminated at GW1. Host is in different external subnet, which is terminated at GW2.
So the switches are visible for the Nagios as this line of Parent/Child
Nagios - SW1 - SW2 - SW3 - SW5
___________________|
__________________SW4
As an option, I could create a new command for the Host check to ping the default GW from nagios and set the SW5 as parent... But it seems like a workaround more than solution.
As an other option I could add this Host as a service to the GW2 (using modified chec_host_alive command to ping this host instead of GW2 IP) and as a host to the SW5. This is workaround also.
Host Child/Parent Issue
Re: Host Child/Parent Issue
Here is the description of the parents option.
https://assets.nagios.com/downloads/nag ... ility.html
Take a look at this link that describes how the parent child relationship works.This directive is used to define a comma-delimited list of short names of the "parent" hosts for this particular host. Parent hosts are typically routers, switches, firewalls, etc. that lie between the monitoring host and a remote hosts. A router, switch, etc. which is closest to the remote host is considered to be that host's "parent". Read the "Determining Status and Reachability of Network Hosts" document located here for more information. If this host is on the same network segment as the host doing the monitoring (without any intermediate routers, etc.) the host is considered to be on the local network and will not have a parent host. Leave this value blank if the host does not have a parent host (i.e. it is on the same segment as the Nagios host). The order in which you specify parent hosts has no effect on how things are monitored.
https://assets.nagios.com/downloads/nag ... ility.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Host Child/Parent Issue
In addition, you might want to look at using check_clusters.
You can create a host object that uses the status of other host objects current state. It's very powerful any might be the solution you are after.
https://support.nagios.com/kb/article.php?id=381
You can create a host object that uses the status of other host objects current state. It's very powerful any might be the solution you are after.
https://support.nagios.com/kb/article.php?id=381
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Host Child/Parent Issue
Hi guys,
thanks for replies.
tgriep, I've read it and anything more even before I decided to take community and devs time here. Really, Parent/child seems to be not designed to solve the issue, when there are more than 1 straight way to the monitored host, ie mgmt network for switches and various vlans than are terminated on different gateways. Say you've got a nice network of switches, where the child/parent connections are obvious, but there are lots of vlans in those switches, that create another logical chains for monitored hosts so the way from Nagios to those hosts now goes not only via the L2 segments, but via different routers, still staying in the same L2 segment.. We should be able to choose the logic, which Parent/Child thing uses:
If I would be able to set the obvious OR logic (to tell nagios to change the child host state to unknown, when one of the parents is down) it would be great. At this moment nagios will change the child state to unknown only when both or ALL parents are down.
Box293
check_clusters seems to be just another workaround as I offered before, but hardcoded one. This won't change the monitored host state, that is what I'm trying to do.
I just want the child to be unreachable when one of its parents is down. Or say, when 2 of 3 parents are down. Is there a way to do this?
As another workaround, which seems to be the most logical, I've set monitored host as a child of it's default gateway, while on the switch, I've set to monitor the port number as a service.
thanks for replies.
tgriep, I've read it and anything more even before I decided to take community and devs time here. Really, Parent/child seems to be not designed to solve the issue, when there are more than 1 straight way to the monitored host, ie mgmt network for switches and various vlans than are terminated on different gateways. Say you've got a nice network of switches, where the child/parent connections are obvious, but there are lots of vlans in those switches, that create another logical chains for monitored hosts so the way from Nagios to those hosts now goes not only via the L2 segments, but via different routers, still staying in the same L2 segment.. We should be able to choose the logic, which Parent/Child thing uses:
If I would be able to set the obvious OR logic (to tell nagios to change the child host state to unknown, when one of the parents is down) it would be great. At this moment nagios will change the child state to unknown only when both or ALL parents are down.
Box293
check_clusters seems to be just another workaround as I offered before, but hardcoded one. This won't change the monitored host state, that is what I'm trying to do.
I just want the child to be unreachable when one of its parents is down. Or say, when 2 of 3 parents are down. Is there a way to do this?
As another workaround, which seems to be the most logical, I've set monitored host as a child of it's default gateway, while on the switch, I've set to monitor the port number as a service.
Re: Host Child/Parent Issue
You could probably try using the Nagios BPI as another "workaround".I just want the child to be unreachable when one of its parents is down. Or say, when 2 of 3 parents are down. Is there a way to do this?
https://exchange.nagios.org/directory/D ... on/details
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Host Child/Parent Issue
lmiltchev
thnak you!
At least after fast reading of the documentation provided with the plugin, it seems like it could solve the issue. But seems, like it won't solve the dependency of the child in the nagios core itself.
Its a pity we can't configure the parent logic on the default nagios core installation.
I'll post the results of my tests and researches here.
thnak you!
At least after fast reading of the documentation provided with the plugin, it seems like it could solve the issue. But seems, like it won't solve the dependency of the child in the nagios core itself.
Its a pity we can't configure the parent logic on the default nagios core installation.
I'll post the results of my tests and researches here.
Re: Host Child/Parent Issue
We will keep this thread open. Let us know if you have any more questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Host Child/Parent Issue
Hi
Is there any way to change this behavior?
Field goes so large because of pretty long service names in the list.. I just can't find any way to make it look better.
I've found the way to make it look better in css file, but in this case I can't see those full names there...
Seems that I have to move the right field a bit more right or below the select box.
Any ideas, how do I do it?
Is there any way to change this behavior?
Field goes so large because of pretty long service names in the list.. I just can't find any way to make it look better.
I've found the way to make it look better in css file, but in this case I can't see those full names there...
Seems that I have to move the right field a bit more right or below the select box.
Any ideas, how do I do it?
Re: Host Child/Parent Issue
Positioning issue is solved by changing the style to look like this:
div.floatRight
{
width: 300px;
clear:both;
float:left;
}
div.floatRight
{
width: 300px;
clear:both;
float:left;
}
Re: Host Child/Parent Issue
There is a bug:
I can't remove members from the group by pressing the X button in the edit mode. Button pressed, X disappears, but member does not.
I can't remove members from the group by pressing the X button in the edit mode. Button pressed, X disappears, but member does not.