Page 1 of 1

Issue with service dependency setup

Posted: Sat Jan 16, 2016 10:36 pm
by mhixson2
Hi guys,

I am setting up service dependencies for the first time and I'm running into an issue. When I initially set up my services, I used the service config name as the unique identifier for each service, but I kept the service description generic (just "CPU" instead of "Prod_Citrix_CPU") in an effort to keep the UI and notifications clean. So I have multiple services with the same description.

My issue now, is the service dependency setup pulls the service description as the service identifier and I can't tell which CPU service is which. I'm stuck. I don't want to rename the services because I'll lose historical data.

Is there any way out of this mess without renaming my services? Is it possible to modify the service dependency setup to pull the service name instead of the description?

As always, thanks for your help.
Mike

Re: Issue with service dependency setup

Posted: Sun Jan 17, 2016 9:18 pm
by mhixson2
I remembered about the renaming tool, so I tried using that to rename one of my preprod services, but I received the error below when I tried. After the error, I found the rename was made, the the config was not applied. If I apply it manually, historical perfdata was lost.
nagios1.png
nagios2.png
nagios3.png

Re: Issue with service dependency setup

Posted: Sun Jan 17, 2016 9:48 pm
by Box293
mhixson2 wrote:My issue now, is the service dependency setup pulls the service description as the service identifier and I can't tell which CPU service is which.
Can you provide some screenshots that shows this.

Can you also explain the dependency you are setting up.

Re: Issue with service dependency setup

Posted: Thu Jan 21, 2016 12:47 pm
by mhixson2
Screenshots below.
cpu1.png
cpu2.png
I have several services executing external scripts running on my hosts that begin to time out and send critical notifications if the CPU reaches a critical state on the host. This is understandable, but I want to set up a dependency that stops the external script services from alarming when the CPU is in a critical state. That's the goal.

Thanks

Re: Issue with service dependency setup

Posted: Thu Jan 21, 2016 2:31 pm
by ssax
You can just ignore that.

Just select one of them, the only thing that selection matters for is the servicename, so select any one of the CPU ones.

Now just select the hosts or hostgroups that you want it to apply to.

You would follow the same process for the dependent hosts.

Here is why that works:

First we know that a service dependency will only work on services and a host dependency will only work on hosts.

Here is a simple example of what the resulting service dependency looks like:

Code: Select all

define servicedependency {
       dependent_hostgroup_name      		hostgroup2
       dependent_service_description 		SSH
       hostgroup_name                		hostgroup1
       service_description           		CPU
       inherits_parent               		1
       execution_failure_criteria    		w,c,o,
       notification_failure_criteria 		w,c,o,
       dependency_period             		24x7
}	
You'll notice that service_description and dependent_service_description only use the service description and doesn't do anything with the hostname/hostgroup (what I mean is it uses "CPU" instead of "hostgroup - CPU"), that's why you need to select the hosts/hostgroups so that it will know what it applies to.

Let me know if you have any questions.