Update the IP address of multiple hosts

Does anyone know a (simple) way to update the IP address of multiple hosts, I’d rather not have to manually edit the host config of 140 hosts.

Basically, we decided what 140 hosts, that did just random DHCP address, needed to a DHCP reservation, and that the reservation would be a different IP address. Each device has since rebooted and now has the new IP address, and Check_Mk (raw 2.1.0p19 edition) is saying these devices are off line.

So rather than manually edit the IP address of these 140 devices (which is the raw edition is a VERY close process), I’d like to know if there is a better way (in incinga I would just edit the appropriate config file, as it’s basically just a txt file). Can I do the same in Check_Mk, (or some other method?)

I could I guess just delete all the devices, and just import them again, but I’m hoping for a better option.

Ta
Nic.

You can use the REST-API to change the configuration in an automatic way.

You could edit the configuration files under $OMD_ROOT/etc/check_mk/conf.d/wato, especially the host.mk where hostname and IP addresses are configured. After that run cmk -O as site user.

You could also remove the IPs from the configuration and rely on DNS to provide them. Checkmk will then resolve the hostname to an address and cache the result for 24 hours.