Page 1 of 1

Host dependant on his services

Posted: Tue Nov 14, 2017 3:18 am
by eltrasimaco
Sure this subject has been addressed elsewhere, but i haven't found it.
Can a host state be set only by its services state?
Probably this could be done hardcoding $SERVICESTATEID$ 's in a custom command, but I want to know if there is some other way
Thanks!

Re: Host dependant on his services

Posted: Tue Nov 14, 2017 10:42 am
by mcapra
Logically I don't think such an arrangement would make sense in the land of Nagios.

The BPI component can do similar things in terms of logically coupling many services to a specific status:
https://assets.nagios.com/downloads/nag ... BPI_v2.pdf
eltrasimaco wrote:Probably this could be done hardcoding $SERVICESTATEID$ 's in a custom command
It could, but you could also create a situation where your checks are deadlocked as I do not believe Nagios executes active checks of services when the parent host is in a "DOWN" state.

Re: Host dependant on his services

Posted: Tue Nov 14, 2017 11:38 am
by kyang
Thanks @mcapra!

@eltrasimaco, mcapra is right. What is the use case for this example? You could test it out yourself, but depending on what you're trying to do, it might not work as it should as mcapra stated.

Re: Host dependant on his services

Posted: Tue Nov 14, 2017 2:04 pm
by eltrasimaco
A use case regarding this issue could be a virtual switch, where his status depends by the status of a cluster of switches; the virtual switch is the host (no physical stuff here, just logical) and it contains several services (physical interfaces of "chidren").

Re: Host dependant on his services

Posted: Tue Nov 14, 2017 4:08 pm
by dwasswa
Hi @eltrasimaco,

I strongly agree with what @mcapra suggested.

Using BPI would be your easiest and shortest route to step up your kind of use case where the health of a host is monitored based on rules you have defined for a group of services.

Therefore, I strongly that you put this kb article Using_Nagios_BPI into consideration.

Please try that and let us know if you have any questions.

Re: Host dependant on his services

Posted: Wed Nov 15, 2017 2:15 am
by eltrasimaco
OK , I'll try that
Thats all for now, thank you.

Re: Host dependant on his services

Posted: Wed Nov 15, 2017 11:39 am
by eltrasimaco
Only one question BPI related: Can a BPI host show itself like the "ordinary" hosts in the operations center?
At a glance, it appears to me that BPI objects can only be accessed via BPI menu, not the standard one

Re: Host dependant on his services

Posted: Wed Nov 15, 2017 4:15 pm
by npolovenko
@eltrasimaco, BPI unites hots in special groups versus operations center shows info about individual hosts and services. So it is not possible as of right now.
You still should be able to see individual hosts from your BPI groups though.