u/PalpitationNo7477

▲ 3 r/zabbix

Curl output to Zabbix http agent issues Error 403

On my Zabbix server from the terminal I can successfully do the following.
curl --location "https://{URL}i/v1/units/unit?hostname={host}" --header 'Authorization: API-Key {API-Key}'

Configuring HTTP agent

In the URL field I enter:
https://{URL}i/v1/units/unit?hostname={host}"

In the Headers section I configure:
Name:
Authorization:
Value:
API-Key {API-Key}

From Zabbix I get error 403 instead of the JSON response expected.

Response code "403" did not match any of the required status codes "200" <html> <head><title>403 Forbidden</title></head> <body> <center><h1>403 Forbidden</h1></center> </body> </html>

Any ideas?
Is there a document somewhere that can help translating curl output to http-agent?

reddit.com
u/PalpitationNo7477 — 12 days ago