Bulk Load solution for Service Monitor Dependencies

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by lmiltchev »

define servicedependency {
dependent_hostgroup_name ME731
dependent_service_description Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000
host_name xx.xx.xx5.254
service_description Ping
inherits_parent 1
execution_failure_criteria w,u,c,p,
dependency_period 24x7
}
This doesn't seem right... How many "Service Dependencies" configs do see in the GUI?

CCM->Advanced->Service Dependencies

I have set up a "test" service dependency and I am not able to recreate the issue. See below:
example01.PNG

Code: Select all

###############################################################################
#
# Service dependency configuration file
#
# Created by: Nagios Core Config Manager 2.3.0
# Date:	      2014-12-17 12:31:19
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios CCM will overwrite all manual settings during the next update if you 
# would like to edit files manually, place them in the 'static' directory or 
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define servicedependency {
       dependent_hostgroup_name      		linux-servers
       dependent_service_description 		Ping
       host_name                     		localhost
       service_description           		PING
       inherits_parent               		1
       execution_failure_criteria    		u,c,p,
       notification_failure_criteria 		w,u,c,p,
       dependency_period             		24x7

}	

###############################################################################
#
# Service dependency configuration file
#
# END OF FILE
#
###############################################################################
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by JakeHatMacys »

Just the one, so it's just me setting up a ping on the store switch and then pulling over all the Services on each CVT to shut off like this:
Capture.JPG
Capture1.JPG
Result was this in the file:

define servicedependency {
dependent_hostgroup_name ME731
dependent_service_description Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000
host_name xx.xx.xx5.254
service_description Ping
inherits_parent 1
execution_failure_criteria w,u,c,p,
dependency_period 24x7

}

GUI after is only 1 entry:
Capture.JPG
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by abrist »

JakeHatMacys wrote: define servicedependency {
dependent_hostgroup_name ME731
dependent_service_description Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000
host_name xx.xx.xx5.254
service_description Ping
inherits_parent 1
execution_failure_criteria w,u,c,p,
dependency_period 24x7

}
Yeah, this looks wrong. Those checks should have the host name as well as the service description. What version of XI are you running?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by JakeHatMacys »

abrist wrote:
JakeHatMacys wrote: define servicedependency {
dependent_hostgroup_name ME731
dependent_service_description Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,Ping,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000,TCP Port 25000
host_name xx.xx.xx5.254
service_description Ping
inherits_parent 1
execution_failure_criteria w,u,c,p,
dependency_period 24x7

}
Yeah, this looks wrong. Those checks should have the host name as well as the service description. What version of XI are you running?
Nagios XI 2014R2.0
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by JakeHatMacys »

If I don't use a Host Group I get this:

define servicedependency {
dependent_host_name CVT3066704,CVT3084397
dependent_service_description Ping,Ping,TCP Port 25000,TCP Port 25000
host_name 11.51.115.254
service_description Ping
inherits_parent 1
execution_failure_criteria w,u,c,p,
dependency_period 24x7

}

still sorta the same thing....
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by lmiltchev »

I see what is going on. We posted an internal feature request for reworking the way services/dependent services are adding under the "Service Dependency Management" in the CCM.
Meanwhile, you can try a "workaround" that will clear up your config. Add only one of the "Ping" services (on any host, that is a member of the hostgroup). This setup should work and you won't have bunch of "Pings" in the config.
Be sure to check out our Knowledgebase for helpful articles and solutions!
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by JakeHatMacys »

lmiltchev wrote:I see what is going on. We posted an internal feature request for reworking the way services/dependent services are adding under the "Service Dependency Management" in the CCM.
Meanwhile, you can try a "workaround" that will clear up your config. Add only one of the "Ping" services (on any host, that is a member of the hostgroup). This setup should work and you won't have bunch of "Pings" in the config.
so you're saying that:

define servicedependency {
dependent_hostgroup_name ME731
dependent_service_description Ping,TCP Port 25000
host_name xx.xx.xxx.254
service_description Ping
inherits_parent 1
execution_failure_criteria w,u,c,p,
dependency_period 24x7

}

Is perfectly functional, that every host in ME731 (whether it's 30 or 1) with a Ping & TCP Port 25000 will be dependent on the store switch's ping that I have set there? That I only need the 1 entry per monitor type? This is actually preferable and I just want to confirm this.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by lmiltchev »

That I only need the 1 entry per monitor type? This is actually preferable and I just want to confirm this.
I haven't personally tested this, but according to our developers, yes - you only need 1 entry.

Your actual checks are named the same on all of the members of this hostgroup ("Ping"). They are not named "CVTO644949 - Ping", "CVTO0883470 - Ping", etc. The "<hostname>-<service description>" in the list is to make this more "user friendly". It is not easy to come up with a solution that would make all of the users happy. For example, we had requests in the past for adding the <hostname> part to the mix, as it was confusing for some users to identify which service belongs to which host (if only the service name was listed, i.e. "Ping")... I hope our developers will find a better solution compared to what we currently have but it will take some time.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked