Hi - I would like to be able to select more fields in the dropdown list when I do a Bulk Upload using the Bulk Host Cloning and Import Config Wizard
Spefically the Name field but I noticed that it is used in the dropdown list for the Hostname - bit confusing?
Anyway, can anyone assist on what needs to be changed to add fields to the dropdown list.
BTW - If others are interested, could we add it as a feature request?
regards... Fred
Bulk Cloning Config Wizard
-
Fred Kroeger
- Posts: 588
- Joined: Wed Oct 19, 2011 11:36 pm
- Location: Perth, Western Australia
- Contact:
Re: Bulk Cloning Config Wizard
I suppose we can change "Name" to "Host Name" as this is the "host_name" directive, and add "Display Name", which will correspond to the "display_name" directive.Spefically the Name field but I noticed that it is used in the dropdown list for the Hostname - bit confusing?
FYI, I added an internal feature request about adding the "display_name" field to the "Bulk Host Cloning and Import" wizard (TASK ID 8269).
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
bheden
- Product Development Manager
- Posts: 179
- Joined: Thu Feb 13, 2014 9:50 am
- Location: Nagios Enterprises
Re: Bulk Cloning Config Wizard
If you're deadset on changing it yourself.. making those changes shouldn't be too difficult, if you're comfortable with manipulating/creating configuration wizards. If you *aren't* comfortable (yet), here's a quick primer: https://assets.nagios.com/downloads/nag ... ios-XI.pdf.
Now that you've read and understood all that, you'll need to change a few pieces of code inside of html/includes/configwizards/bulkhostimport/bulkhostimport.inc.php
I'm not going to give you the specifics, just a brief outline of what you'll need to do - keep in mind there is always a bit of trial and error involved when customizing configuration wizards.
1. In the "CONFIGWIZARD_MODE_GETSTAGE2HTML" section, you'll need to add your field as an <option> in those <select>s.
2. In the "CONFIGWIZARD_MODE_GETOBJECTS" section, you'll need to add the logic you require to update the $objs variable before its passed back to XI (specifically in the defaults and the switch($fields[$i]) that follows right after and then in the section that starts with "// Add the host").
Hope this helps!
Now that you've read and understood all that, you'll need to change a few pieces of code inside of html/includes/configwizards/bulkhostimport/bulkhostimport.inc.php
I'm not going to give you the specifics, just a brief outline of what you'll need to do - keep in mind there is always a bit of trial and error involved when customizing configuration wizards.
1. In the "CONFIGWIZARD_MODE_GETSTAGE2HTML" section, you'll need to add your field as an <option> in those <select>s.
2. In the "CONFIGWIZARD_MODE_GETOBJECTS" section, you'll need to add the logic you require to update the $objs variable before its passed back to XI (specifically in the defaults and the switch($fields[$i]) that follows right after and then in the section that starts with "// Add the host").
Hope this helps!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Nagios Enterprises
Senior Developer
Nagios Enterprises
Senior Developer
-
Fred Kroeger
- Posts: 588
- Joined: Wed Oct 19, 2011 11:36 pm
- Location: Perth, Western Australia
- Contact:
Re: Bulk Cloning Config Wizard
Brilliant ! Thanks all.
I'll try and make those changes after the next upgrade.
Fred
I'll try and make those changes after the next upgrade.
Fred
Re: Bulk Cloning Config Wizard
Fred, do you want us to keep the thread open?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
Fred Kroeger
- Posts: 588
- Joined: Wed Oct 19, 2011 11:36 pm
- Location: Perth, Western Australia
- Contact:
Re: Bulk Cloning Config Wizard
You can close this - I have enough info to get started. If I have any specific questions I'll open it again.
thanks... Fred
thanks... Fred
Re: Bulk Cloning Config Wizard
Thanks Fred, closing this one out now....
Be sure to check out the Knowledgebase for helpful articles and solutions!