Adding new service to 400+ hosts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Adding new service to 400+ hosts

Post by BanditBBS »

Okay, I could be brain dead right now, I just don't know, it has been a long, long week...make that month. :evil:

Here is my issue:
My Setup:
I have 400+ Windows servers in my XI. When I add them, I use the bulk host cloning tool and copy the 6 main service checks I am doing. Most of those service checks are blank and inherit everything from a template. This gives me the ability to modify on a per server basis, if needed.

My Issue:
There is a new service I want to add to the basic list of services for all(almost all) servers. How can I make a copy of that for all 400+ servers? I temp did it by just adding a service that uses the proper template and assigns it to the hostgroup all_windows. this is causing some warning and crit issues as this can't go on all windows, just 99.9% of them. If there was some way to exclude the inheritance, that would work, but to my knowledge, I cant. So, how can I easily copy this service for 400+ hosts?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Adding new service to 400+ hosts

Post by slansing »

Hmm.. could you duplicate that hostgroup, then exclude those hosts from the new group, then assign the service to it? I realize this is a bit goofy for just one service, but perhaps in the future you will add new services that require the same exclusions? Unfortunately there is still not a good solution to exclusions in the CCM..
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Adding new service to 400+ hosts

Post by BanditBBS »

What about the other part of my question, creating 400 copies of the service, 1 for each host, that way i can modify on a host by host basis if needed.

There's an idea for a tool - Bulk Service Cloning - Select a service and then the hosts to clone that service too :) Go write that for me now, will ya? In the meantime, I'll mail merge again, grrrr

EDIT: OMG - will you please sort the backend api. You know how hard it is to find a name in that list, geez!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Adding new service to 400+ hosts

Post by abrist »

That is a good idea. Have you had a tracker.nagios.com feature request session today?
BanditBBS wrote:EDIT: OMG - will you please sort the backend api. You know how hard it is to find a name in that list, geez!
ctrl-f? :P But seriously, sorted xml should be expected. Should it be sorted by name, id, other?
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.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Adding new service to 400+ hosts

Post by BanditBBS »

abrist wrote:That is a good idea. Have you had a tracker.nagios.com feature request session today?
BanditBBS wrote:EDIT: OMG - will you please sort the backend api. You know how hard it is to find a name in that list, geez!
ctrl-f? :P But seriously, sorted xml should be expected. Should it be sorted by name, id, other?
1.) LOL'd at the tracker comment :) I'll go put in the request for the bulk service creation tool

2.) I'm talking about the drop down box that lists all my users. I can start typing, but god would I just like it in a sorted list! either name or Id would work for me.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Adding new service to 400+ hosts

Post by BanditBBS »

2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Adding new service to 400+ hosts

Post by sreinhardt »

Before I lock it up, did you get the services created? I doubt your going to like it, but my personal route for this one might be creating an the configs via scripting and replacing hostname\other important details with a for loop, them using the import tool. I also spent about 2 minutes thinking about this out loud so there certainly could be an easier way.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Adding new service to 400+ hosts

Post by BanditBBS »

Yeah, I got them created. Until you create an easy way for us customers to do something so simple(lol) I just use mail merge in word to basically do what you said. Too lazy to script it as it honestly takes a few seconds then all I have to do is cfgprep the file and import the 531 files! Boy did that seem to take a while...but its all good!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Adding new service to 400+ hosts

Post by WillemDH »

I'm using the bulk host cloning wizard to configure a new service for all my hosts.. Just select one service from the source host and clone to all existing host? Did this multiple times and seems to work fine. (got a big Excel with all Windows servers and ip with the comma's for easy copy paste)
Nagios XI 5.8.1
https://outsideit.net
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Adding new service to 400+ hosts

Post by BanditBBS »

WillemDH wrote:I'm using the bulk host cloning wizard to configure a new service for all my hosts.. Just select one service from the source host and clone to all existing host? Did this multiple times and seems to work fine. (got a big Excel with all Windows servers and ip with the comma's for easy copy paste)
Ok, so that works? I hadn't gotten around to testing that.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked