Nagios service active only when other service is failing

Posted by Laimoncijus on Server Fault See other posts from Server Fault or by Laimoncijus
Published on 2012-07-09T08:46:42Z Indexed on 2012/07/09 9:17 UTC
Read the original article Hit count: 156

Filed under:

Is is possible to define service to be active only the times while other service is failing?

Consider following example:

  • 2 hosts available: HostA (primary) and HostB (backup).
  • Nagios service, which monitors amount of active connections to the host:
    • gives OK when amount of connections to host > 0
    • gives FAILURE when amount of connections to host = 0

If setup nagios service to monitor both hosts: HostA and HostB - it will give me OK for HostA (while it is primary and all connections normally goes to it) and FAIL for HostB (while it is backup and will receive no connections while HostA is alive).

Can I make the nagios service for HostB somehow depend on sevice of HostA and give no failures (or maybe be inactive) up to the moment the service of HostA starts failing?

© Server Fault or respective owner

Related posts about nagios