I can’t see how to change the “monitored on site” attribute for a host via the API. The /objects/host_config/${TARGET} output does not contain any obvious candidates,
I want to preserve the graphs - should I copy these before migrating? Immediately after? Wait for the new site to create the RRD files then overwrite them?
You want to do that on folder level and drop the hosts into the appropriate folders. I do not know the key you need from the top of my mind, but someone will be able to provide it.
You should copy them in advance, to have the least data loss.
Have you set the attribute on the host and not the WATO folder? If its set on the folder level the API will not return it unless you tell the api to show inherited data.
We just overwrite them when/if we need to move a host from one server to another in a distributed monitoring setup. So host is moved first in our case.
There is also a GitHub project that will do this for you, dont have it here but try to google for it .