Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers 2

You can define a service dependency to achieve this.

There's a documentation page on Host and Service Dependencies

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.