Updating host IP based on mac address

Hi,

I have a stack of switches that changes the management IP if the primary stack management switch is down, is there a method I can use to update the host IP entry automatically so monitoring will continue after the brief hiatus? (I will know the mac addresses of the switches in advance or I can pull it via SNMP using my own plugin)

Edit: Seems the REST API would be a good place to start, I’m just wondering, is there a way I can have checkmk trigger a script that will try to update the host if the stack goes down?

I can only think of an alert handler here.