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.

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                       host1.example.com,host2.example.com
    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
add comment

1 Answer

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
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.