Page 1 of 1

Dependancy service definition

Posted: Mon May 20, 2013 7:01 am
by kalyan1709
Hi All,

I would like to configure a dependacy service for another service. below is my configuration and it is not working properly. Please suggest am I missing anything?

define command{
command_name Site1_Status
command_line $USER1$/check_http -I 172.20.32.35 -u http://sample1.example.com
}

define command{
command_name HTTP_Status
command_line $USER1$/check_http -H 172.20.32.35
}

define service{
use generic-service
host_name Station1
service_description website_status
check_command Site1_Status
}

define service{
use generic-service
host_name Station1
service_description HTTP Status
check_command HTTP_Status
}


define servicedependency{
host_name Station1
service_description website_status
dependent_host_name Station1
dependent_service_description HTTP Status
}

Here if I stop httpd service then the Nagios should not check for website_status. This is my intension. Please suggest.


Thanks & Regards
Kalyan Pasupuleti

Re: Dependancy service definition

Posted: Mon May 20, 2013 11:00 am
by gshergill
Hi kalyan1709,

Just to confirm, the service_description is the service which is being depended on (master service), whereas dependent_service_description is the dependent service.

Also, you might need to use "execution_failure_criteria". This defines when the dependent service is actively checked (i.e. setting the value as c means don't check the dependent service when the master service is critical).

Below is an example configuration you can use:

Code: Select all

define servicedependency{
        dependent_host_name                     host1
        dependent_service_description           MySQL Load
        host_name               host1
        service_description     Load
        execution_failure_criteria      o
        }
So whilst the service "Load" on "host1" is in an OK state, it won't actively check the service "MySQL Load" on "host1".

You can adjust this as required for your set up.

Good luck!

Kind Regards,

Gary Shergill

Re: Dependancy service definition

Posted: Mon May 20, 2013 4:50 pm
by slansing
Let us know how this works out for you kalyan1709! And thanks again Gshergill!

Re: Dependancy service definition

Posted: Tue May 21, 2013 7:29 am
by kalyan1709
Hi Gary,

Thank you very much. I followed your procedure and it is working fine for me.

Thanks & Regards
Kalyan Pasupuleti

Re: Dependancy service definition

Posted: Tue May 21, 2013 10:41 am
by gshergill
Hi Kalyan,

No problem, glad to hear it's working.

Kind Regards,

Gary Shergill