Bulk modify host addresses
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
Bulk modify host addresses
I'm assuming this isn't something that's easily possible, but I figured I'd post here to check anyway. Does anyone know of a way to bulk modify the host address of a ton of hosts?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Bulk modify host addresses
The way I'd do it, would be via the Bulk Host Cloning Wizard, I'd clone the hosts out to the new addresses, then just disable/remove the old ones. Since it's not currently a feature, that is one of the workarounds I've suggested.
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
Re: Bulk modify host addresses
Hmm, good idea. Question on that. If I use the bulk host cloning wizard and clone a host with the same host name, what does that do to the original host? Will the new one overwrite the old? E.g. <host1><address1> clone to <host1><address2>. If the host name remains the same, would I still have 2 host config files or would that second host with the new address actually replace the config files of the original?
Re: Bulk modify host addresses
You could grab all the host cfg files, modify as needed, throw them in the import folder and use the import tool making sure to check the box "overwrite database"
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
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
Re: Bulk modify host addresses
Do you have a CSV or other file showing the relationship between the old IP and the new, or the hostname and the new address? If so you can do some direct SQL modifications, but we would want to test this first as modifying the db directly can be dangerous.
Former Nagios employee