Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

You can define a service dependency to achieve this.

There's a documentation page on Host and Service Dependencies

share|improve this answer

Sure, you can do whatever you want with a check plugin. I'm not aware of anything built-in that will do what you want.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.