how to use servicedependency?

Jeremy C. Reed reed at reedmedia.net
Wed Sep 26 21:03:29 CEST 2007


(I posed a couple weeks ago, but only got one response which was different 
than what I think I want to do.)

I am running Nagios 2.9.

I want: if a check_ping fails then I don't want an alert sent to me 
unless a second test (check_nrpe to a remote system that does the same 
check_ping) fails.

I am reading http://nagios.sourceforge.net/docs/2_0/dependencies.html
(I was looking at 3_0 last time.) And I am looking at 
http://www.linickx.com/blog/archives/271/how-to-monitor-wordpress-with-nagios/

Where is execution_failure_criteria and notification_failure_criteria 
documented for 2.9?

Can someone please provide an example of only sending a problem alert if 
two different check_commands fail and the second check_command is not done 
if the first one is OK?

This is what I have:

define service {
                 use service-template
        host_name sj2
        service_description sj2.router1
        check_command check_nrpe!check_router1
}

# The "dependent" is the object that needs something.
define servicedependency {
        dependent_host_name sj2
        dependent_service_description sj2.router1
        host_name sv1
        service_description sv1.dummy1
# o = fail on an OK state, the dependent service will not be actively
# checked if the master service is in OK
        execution_failure_criteria o
#       notification_failure_criteria o
}

define service {
                 use service-template
           host_name sv1
 service_description sv1.dummy1
       check_command check-link
}


But I am getting two alerts if both don't return OK. I only want one 
alert. Also I am unsure how to use the execution_failure_criteria and 
notification_failure_criteria.

And I do not want my "sj2.router1" to even be checked if the first 
"sv1.dummy1" is successful. But if sv1.dummy1 fails, then I want the 
sj2.router1 check to happen. And if it fails then send my alert.



  Jeremy C. Reed

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list