[ZBX-15812] item.get are listing an empty itemDiscovery[] array when using selectItemDiscovery Created: 2019 Mar 13 Updated: 2019 Apr 03 Resolved: 2019 Apr 03 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A), Frontend (F) |
Affects Version/s: | 4.0.5 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Aigars Kadikis | Assignee: | Zabbix Development Team |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() |
||||
Issue Links: |
|
Description |
Steps to reproduce Link LLD-item-is-not-discovered-anymore.xml zabbix_server -R config_cache_reload Send two traps: zabbix_sender -z 127.0.0.1 -s "Zabbix server" -k lld.trap -o '{"data":[{"{#VAR}":"one"},{"{#VAR}":"two"}]}' zabbix_sender -z 127.0.0.1 -s "Zabbix server" -k lld.trap -o '{"data":[{"{#VAR}":"one"},{"{#VAR}":"three"}]}' Go to Zabbix server items and filter application "var". Observe if one of the items is not discovered anymore: Let's try to identify this via API by using selectItemDiscovery query: { "jsonrpc": "2.0", "method": "item.get", "params": { "selectItemDiscovery": "query", "search": { "key_": "key" }, "output": "extend", "hostids": "10084", "sortfield": "name" }, "auth": "e8e040ac9dc043aa6045acd180703061", "id": 1 } The following response.json Expected Based on the documentation page itemDiscovery must show attributes:
.. and more |
Comments |
Comment by Aigars Kadikis [ 2019 Apr 03 ] |
The problem was missing details in the API call. To identify the items which will be deleted soon I need to specify lastcheck and ts_delete in for selectItemDiscovery parameter, like: { "jsonrpc": "2.0", "method": "item.get", "params": { "selectItemDiscovery": ["lastcheck","ts_delete"], "search": { "key_": "key" }, "hostids": "10084", "sortfield": "name" }, "auth": "671e70355f04b20c0ecbf28bdb648233", "id": 1 } |