Nagios Service dependency


#1

Hi All ,

I`ve tried last few days to configure service dependencies on my Nagios…
But have not done it how it should work :slight_smile: And honestly i dont know where i am wrong …
So basicly i want to configure nagios to check my host with ping, disk space information, http server availability , etc. And what i want is when there is not ping reply from the host, i want nagios to stop check on other services …
i got config file like this :

Servicedependency definition

define servicedependency{
host_name Live_gate
service_description Uptime Information
dependent_host_name Live_gate
dependent_service_description PING
execution_failure_criteria w,u
notification_failure_criteria o,c,w,u,p
}

Servicedependency definition

define servicedependency{
host_name Live_gate
service_description Disk Space Information C
dependent_host_name Live_gate
dependent_service_description PING
execution_failure_criteria w,u
notification_failure_criteria o,c,w,u,p
}

But when i am set a ipfw rule to deny icmp packets to the host , nagios send me notifications about PING - critical, and all other services with OK states…

is there any chance to send mi CRITICAL states for all services where there is no ping to the host ???

P.S. excuse me for my bad english :slight_smile:

10x a lot


#2

I see this is an old post but I’ll chip in anyway incase you still need an answer =)

I think you have the dependencies defined the wrong way round. You are defining the Service you want depended-on in the dependent services.

"is there any chance to send mi CRITICAL states for all services where there is no ping to the host"
You’ll also want to remove w and add c to the execution_failure_criteria. This means that if the PING service is CRITICAL or UNREACHABLE then it will initiate the dependency. Look at the notification_failure_critiera settings too to check it is doing what you need.
Also would be good to read this: nagios.sourceforge.net/docs/3_0/ … ncies.html

Anyway, I think your definition should look like this:

define servicedependency{
host_name Live_gate
service_description PING
dependent_host_name Live_gate
dependent_service_description Uptime Information,Disk Space Information C
execution_failure_criteria c,u
notification_failure_criteria o,c,w,u,p
}


#3

Dear All,

I’m afraid that Services Dependencies doesn’t work as expected. Take a look at:

viewtopic.php?f=59&t=5104&p=16828&hilit=dependencies#p16828

I Hope it helps.