Page 1 of 1
Change IP addresses for all servers
Posted: Mon Mar 30, 2020 10:19 am
by seaward1983
RHEL 6.x
NagiosXI 5.6.12
VMWare
We're migrating servers to another VLAN, in mass. Is there a way - MySQL query maybe - to update all IP addresses at once?
Re: Change IP addresses for all servers
Posted: Mon Mar 30, 2020 3:07 pm
by jbrunkow
The easiest way to do this would probably be by interacting with the API. If you navigate to the
Help section ( url: [
XI server IP address]
/nagiosxi/help/ ), you should see an
Objects Reference page detailing the various objects you can query from your servers. The agent can output either
XML or
JSON data.
If you had a list of IP addresses for the servers, something like the bash script example below could then iterate through the command for various servers.
Code: Select all
for $SERVER in $(cat $LIST);
do
[ COMMAND ];
done;