Closed Flums closed 4 months ago
When I run the script, it gives me an error and no hosts are updated:
OMD[SITE]:~/etc/check_mk/conf.d/wato/servers$ python3 vm_parent.py -i SITE -s http://127.0.0.1/SITE/ -u automation -r VM-7 gets host02 as parent Traceback (most recent call last): File "/tmp/vm_parent.py", line 60, in wato.edit_host(host, etag=etag, update_attr={'parents': [ hosts[host] ]}) File "/omd/sites/SITE/local/lib/python3/checkmkapi.py", line 456, in edit_host resp.raise_for_status() File "/omd/sites/SITE/local/lib/python3/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: BAD REQUEST for url: http://127.0.0.1/SITE/check_mk/api/v0/objects/host_config/VM-7
What version of Checkmk, what version of the helper MKP and what version of the Checkmk API wrapper are you using?
When I run the script, it gives me an error and no hosts are updated:
OMD[SITE]:~/etc/check_mk/conf.d/wato/servers$ python3 vm_parent.py -i SITE -s http://127.0.0.1/SITE/ -u automation -r VM-7 gets host02 as parent Traceback (most recent call last): File "/tmp/vm_parent.py", line 60, in
wato.edit_host(host, etag=etag, update_attr={'parents': [ hosts[host] ]})
File "/omd/sites/SITE/local/lib/python3/checkmkapi.py", line 456, in edit_host
resp.raise_for_status()
File "/omd/sites/SITE/local/lib/python3/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: BAD REQUEST for url: http://127.0.0.1/SITE/check_mk/api/v0/objects/host_config/VM-7