-
Incident report
-
Resolution: Duplicate
-
Critical
-
None
-
None
-
None
-
Tested with Zabbix 2.2.2, 2.2.5, 2.2.9
Hi,
According to the Zabbix API documentation (https://www.zabbix.com/documentation/2.0/manual/appendix/api/trigger/get), I can filter triggers by host using the attribute "host". But this does not work in many Zabbix 2.2.x versions (Tested with Zabbix 2.2.2, 2.2.5 and 2.2.9).
Indeed, assuming that the "auth" given in the following json is valid, making the following curl request returns empty result ({"jsonrpc":"2.0","result":[],"id":3}). And that's not compliant with the aforementioned API specification.
In the example "zabbix-server-addr" point to a valid Zabbix server
curl -X POST -H 'Content-Type: application/json' -d '{ "jsonrpc": "2.0", "auth": "4046f8c10bb1050e19ed6f4e73ad1474", "method": "trigger.get", "params": { "active": true, "host": "Zabbix server", "selectGroups": [ "name" ], "selectHosts": [ "host" ], "selectItems": [ "key_", "name", "lastclock" ], "output": [ "description", "value", "error", "comments", "priority" ], "limit": -1 }, "id": 3 }' 'http://zabbix-server-addr/zabbix/api_jsonrpc.php'
- duplicates
-
ZBX-6834 "Trigger.get" with "host" param returns nothing
- Closed