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.
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Bulk Load solution for Service Monitor Dependencies

Post by JakeHatMacys »

Is there a way to sudo "bulk" load Service Dependencies?

We're in a situation in stores where I'm going to have several devices with the same service dependencies and I'm wondering if there's a utility to do this in the masses like the bulk load tool. Otherwise probably just looking at editing the file manually from one device and just coping & pasting the names. Creating entries via the Gui is going to get too messy.

If I go the route of editing the file manually do you guys have a best practice for that???
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Bulk Load solution for Service Monitor Dependencies

Post by tgriep »

You can try the Bulk Modifications tool, to access it
go to the Core Config Manager, Click on Tools, Click on Bulk Modifications

Under there, you can select what you what to change and the host/services that you need to edit.

If that doesn't work for you, please post back with more details that you want to change.
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 »

tgriep wrote:You can try the Bulk Modifications tool, to access it
go to the Core Config Manager, Click on Tools, Click on Bulk Modifications

Under there, you can select what you what to change and the host/services that you need to edit.

If that doesn't work for you, please post back with more details that you want to change.
Okay, I'll give that a look. Another problem I'm seeing when using the Bulk load tool is I added the Cloned services to a service group for it's store. And when running the bulk clone / load it seems to put all the services into that same service groups I'm cloning... Or at least it thinks it does, they're all greyed out like they're in the group but the Service Group is actually empty. Ever seen anything like this???
Capture.JPG
Capture1.JPG
You do not have the required permissions to view the files attached to this post.
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by JakeHatMacys »

Other weird thing about the service groups is it shows it's there in the core config on the monitor but clearly not when I look in the group. Here's the monitor:
Capture.JPG
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Bulk Load solution for Service Monitor Dependencies

Post by tmcdonald »

There are two ways to put a service in a group.

You can either go to the Services page and click the "Manage Service Groups" button, or you can go to the Service Groups page and add the service to the group from there. Either way achieves the same result, however if you add a service to a group using one method you must use the same method to remove it. Similarly, if you used the Services page to add the service to the group, then the Service Groups page will show it as gray to indicate that it was already added via the Services page.
Former Nagios employee
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by JakeHatMacys »

tmcdonald wrote:There are two ways to put a service in a group.

You can either go to the Services page and click the "Manage Service Groups" button, or you can go to the Service Groups page and add the service to the group from there. Either way achieves the same result, however if you add a service to a group using one method you must use the same method to remove it. Similarly, if you used the Services page to add the service to the group, then the Service Groups page will show it as gray to indicate that it was already added via the Services page.
Okay, that's helpful so it's there I just can't see it because it wasn't added via that method. Gotcha.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Bulk Load solution for Service Monitor Dependencies

Post by tmcdonald »

It can be a bit confusing at first, admittedly. Are we clear to lock this thread or did you want to try the Bulk Mods tool?
Former Nagios employee
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Bulk Load solution for Service Monitor Dependencies

Post by JakeHatMacys »

tmcdonald wrote:It can be a bit confusing at first, admittedly. Are we clear to lock this thread or did you want to try the Bulk Mods tool?
It's looking like I'm going to have to go with manual entries for our Service Dependencies. Do you guys have a step by step for doing that easily with minimal impact?

I guess do you have a clearer step by step process I could follow when referencing this:

--- 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.
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 »

If you just modify the configs in the CLI, the next time you apply configuration, the configs will be overwritten (and changes would be lost).

If you really need to add/remove hosts from the CLI, try following the steps, outlined in this document:

http://assets.nagios.com/downloads/nagi ... gement.pdf
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:If you just modify the configs in the CLI, the next time you apply configuration, the configs will be overwritten (and changes would be lost).

If you really need to add/remove hosts from the CLI, try following the steps, outlined in this document:

http://assets.nagios.com/downloads/nagi ... gement.pdf
Awesome, quick question in regards to the Service Dependency file. So I have 20 or so devices with the same services. Ping & TCP 25000... When I set up the dependency via the GUI it ends up looking like this:

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

}

With really no distinction what so ever on which devices TCP Port 25000 or Ping is coming from per entry. Is there intelligence in this file where I can just put one entry in for Ping & TCP Port 25000 and it'll match it up with every host's monitors in the Host group ME731??? Or is it just not showing me that there is a distinction?

End result of what I'm talking about would be this:

define servicedependency {
dependent_hostgroup_name ME731
dependent_service_description Ping,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
}

And it'd do the exact same thing???
Locked