Issue with service dependency setup

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mhixson2
Posts: 96
Joined: Wed Jun 24, 2015 3:02 pm

Issue with service dependency setup

Post 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
mhixson2
Posts: 96
Joined: Wed Jun 24, 2015 3:02 pm

Re: Issue with service dependency setup

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Issue with service dependency setup

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mhixson2
Posts: 96
Joined: Wed Jun 24, 2015 3:02 pm

Re: Issue with service dependency setup

Post 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
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issue with service dependency setup

Post 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.
Locked