Good morning,
I would like to monitor the status of a web app via Zabbix.
To do this, I added the host and to the record I added a web scenario with the url of the site that I want to monitor.
If I manage everything through Zabbix, the monitoring works and the "response code" of the site correctly replies the code 200. But if I try to access the same record through the API, Zabbix returns me the empty field.
I also tried with a user who has maximum rights on the system and the result does not change.
To access the API area that interests me I used Zabbix 6.2 and 6.4 and the official documentation, https://www.zabbix.com/documentation...ttptest/object, and as the API method the " httptest.get".
The CURL command used is
Code:
curl -X POST -k -H 'Content-Type: application/json-rpc' -i 'https://zabbix.mydomain.com/zabbix/api_jsonrpc.php' --data '\{ "jsonrpc": "2.0", "method": "httptest.get", "params": { "selectSteps": "extend", "httptestids": "1", "selectHttpTests": "extend" },"auth":"<token my user>", "id": 1 }' Scrolling in the returned json, the key "status_code" is unfortunately empty while on the documentation it is indicated that if the site is online it should be "200".
Can someone tell me how to fix it and if it was a bug how to report it?
Thank you!