Dependancy service definition

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

Dependancy service definition

Post 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
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Dependancy service definition

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Dependancy service definition

Post by slansing »

Let us know how this works out for you kalyan1709! And thanks again Gshergill!
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

Re: Dependancy service definition

Post by kalyan1709 »

Hi Gary,

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

Thanks & Regards
Kalyan Pasupuleti
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Dependancy service definition

Post by gshergill »

Hi Kalyan,

No problem, glad to hear it's working.

Kind Regards,

Gary Shergill
Locked