Bulk modify host addresses

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Bulk modify host addresses

Post by snapon_admin »

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

Post by slansing »

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.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Bulk modify host addresses

Post by snapon_admin »

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?
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Bulk modify host addresses

Post by BanditBBS »

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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Bulk modify host addresses

Post by tmcdonald »

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
Locked