check_mk_extensions icon indicating copy to clipboard operation
check_mk_extensions copied to clipboard

Problem with the vm_parent.py

Open Flums opened this issue 1 year ago • 1 comments

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

Flums avatar Feb 21 '24 09:02 Flums