Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I have a Nagios system with a large number of hosts categorised in different hostgroups. Each of these hosts has two services monitored on it, one of which is intended to be dependent on the other - if service1 is WARNING or CRITICAL, service2 on that server should not give an alert as well. service2 is intended more for statistic collection, while service1 is a simple availability check - as such, I always want service2 checking, but not alerting if service1 is reporting as down.

This is my services.cfg entry:

define servicedependency{
    hostgroup                       example-servers
    #host_name             ,
    service_description             service1
    dependent_service_description   service2
    execution_failure_criteria      n
    notification_failure_criteria   u,w,c,o

I have tried both specifying it via a hostgroup and as a list of individual servers. Ideally, I would do it for the entire hostgroup in one rather than have to constantly maintain a list.

However, this does not seem to work, either way. If service1 is down, service2 also shows a CRITICAL status in the problems screen and on host details.

share|improve this question

From the Nagios manual for "execution_failure_criteria": "If you specify n (none) as an option, the execution dependency will never fail and checks of the dependent service will always be actively checked (if other conditions allow for it to be)."

Sounds like you should be using "u,c" instead (don't check if server1 is UNKNOWN or CRITICAL). Or perhaps "w,u,c" IF a WARNING state from service1 should also cause service2 not to execute.

share|improve this answer
I'd like the check to be made in any case (for performance data), but only to send notifications if service1 is not warning/critical. – jreid9001 Mar 11 '13 at 10:03

If you specify "execution_failure_criteria n" then service2 will always be checked. If is is checked and is in a warning or critical state the user interface will show that state. You can't prevent that (afaik), but you can prevent it sending notifications, e.g "notification_failure_criteria u,w,c".

I think you can either have "execution_failure_criteria" set as it is (i.e. "n"), and live with the status showing service2 as critical when it can't be reached, or change it to "c".

You probably don't want to suppress notifications if service1 is OK, which is what you are doing with the "o" in "notification_failure_criteria u,w,c,o".

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.