Page 1 of 1
Bulk add servicegroup
Posted: Wed Jun 05, 2019 1:35 pm
by BanditBBS
Forgive me if thread already exists, I'm sure at least one does, just wasn't having luck finding it!
Is there a reason bulk mod tool only allows adding hostgroup but doesn't offer adding servicegroup in bulk? I have a servicegroup I need to add to many services and can't think of an easy way to do it. I can't add then on the sg, I need to add on the service definition.
Re: Bulk add servicegroup
Posted: Wed Jun 05, 2019 3:35 pm
by ssax
Bandit, how goes it brother?
Yep, you're correct, I'll double-check on the FR, I'll let you know shortly on an alternative.
Re: Bulk add servicegroup
Posted: Wed Jun 05, 2019 3:54 pm
by ssax
Here's the FR:
FR: XI - Bulk Mods Tool - Add Add Service Groups/Remove Service Groups (Just like hostgroups)
Actually, I need to know the exact XI version of the one you're working on.
Re: Bulk add servicegroup
Posted: Wed Jun 05, 2019 3:56 pm
by BanditBBS
Don't laugh, 5.4.12. I need to get it upgraded!
Re: Bulk add servicegroup
Posted: Wed Jun 05, 2019 5:01 pm
by ssax
This will only work on 5.4.12 and likely 5.4.13, I wouldn't bother trying it on XI 5.5+
First, take an XI backup (and/or) make sure you can apply config successfully first so it creates a config snapshot that you can revert to if necessary.
Take the attached component, unzip it, and replace these files (make backups of your current ones first):
Code: Select all
/usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php
/usr/local/nagiosxi/html/includes/components/bulkmodifications/step2.php
/usr/local/nagiosxi/html/includes/components/bulkmodifications/includes/bulkmods.js
Then because the index.php file is encrypted you will not be able to see it in the web interface, call it like this directly in the address bar of your browser:
Code: Select all
https://YOURXISERVER/nagiosxi/includes/components/bulkmodifications/step2.php?cmd=addservicegroups
NOTE: Remove servicegroups does not work, don't try it, I couldn't get it to work quick enough (aka, revert to CCM snap if you add it to the wrong ones or make a mistake)
That should do it, let me know the results.