Discussion:
[Check_mk (english)] Web-api add_host call returns "Hostname is missing"
(too old to reply)
Schwab, Bradley
2017-12-13 14:18:47 UTC
Permalink
Raw Message
I have seen other questions in the archive (http://lists.mathias-kettner.de/pipermail/checkmk-en/2017-January/021868.html), but I find no answers, so I am wonder if anyone has resolved this problem.

On a 1.2.6p18 host, using the web-api I am attempting to add a host, calling this url:
http://10.y.y.y/master/check_mk/webapi.py?action=add_host&_username=admin&_secret=secret


And passing this body

{"attributes": {"alias": "test", "ipaddress": “10.x.x.x", "site": "DE3"}, "folder": "Object_Storage/S3HEAD", "Hostname": "DE3T3OSS3HEAD04”}

But all I get
{"result": "Hostname is missing", "result_code": 1}

Any ideas?

Thanks
Scott
This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
Marcel Schulte
2017-12-14 07:05:25 UTC
Permalink
Raw Message
Hi Scott,

you must write "hostname" in lower letters, but did it with a capital H... ;)

BR,
Marcel
Post by Schwab, Bradley
I have seen other questions in the archive (http://lists.mathias-kettner.de/pipermail/checkmk-en/2017-January/021868.html), but I find no answers, so I am wonder if anyone has resolved this problem.
http://10.y.y.y/master/check_mk/webapi.py?action=add_host&_username=admin&_secret=secret
And passing this body
{"attributes": {"alias": "test", "ipaddress": “10.x.x.x", "site": "DE3"}, "folder": "Object_Storage/S3HEAD", "Hostname": "DE3T3OSS3HEAD04”}
But all I get
{"result": "Hostname is missing", "result_code": 1}
Any ideas?
Thanks
Scott
This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
_______________________________________________
checkmk-en mailing list
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
Loading...