Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-15812

item.get are listing an empty itemDiscovery[] array when using selectItemDiscovery

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • None
    • 4.0.5
    • API (A), Frontend (F)
    • None

      Steps to reproduce

      Link LLD-item-is-not-discovered-anymore.xml template to host "Zabbix server" and reload configuration cache:

      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 shows 3 items but the array itemDiscovery[] is empty.

      Expected

      Based on the documentation page itemDiscovery must show attributes:

      • lastcheck - (timestamp) time when the item was last discovered;
      • ts_delete - (timestamp) time when an item that is no longer discovered will be deleted.

      .. and more

            zabbix.dev Zabbix Development Team
            aigars.kadikis Aigars Kadikis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: