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

Can't retrieve Item via API

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Commercial support required
    • Icon: Trivial Trivial
    • None
    • 3.2.7
    • API (A)
    • None

      Hi,
      I'm trying to understand whether i'm doing something wrong or its some component misbehaviour.
      I'm using Zabbix API from pyzabbix v.3.2.6 on python 2.7.10.
      I'm getting trigger first:

      >>> print json.dumps(zapi.trigger.get(triggerids=30159), indent=2)
      [
        {
          "status": "0", 
          "recovery_mode": "0", 
          "description": "{HOST.NAME}: Free disk space is {ITEM.LASTVALUE1} on volume /export/storage1", 
          "state": "0", 
          "url": "", 
          "type": "1", 
          "templateid": "0", 
          "correlation_tag": "", 
          "lastchange": "1508826912", 
          "value": "0", 
          "priority": "5", 
          "triggerid": "30159", 
          "flags": "4", 
          "comments": "", 
          "error": "", 
          "correlation_mode": "0", 
          "expression": "({TRIGGER.VALUE}=0 and ({43468}<20G and {43469}<10))\r\nor \r\n({TRIGGER.VALUE}=1 and ({43468}<21G and {43469}<11))", 
          "recovery_expression": "", 
          "manual_close": "0"
        }
      ]
      

      I assume in expression field values in curly braces - 43468 and 45469 -
      are ItemIds.
      Next, i'm trying to get those items:

      >>> zapi.item.get(itemids=43468)
      []
      

      See attached screenshot for that action sequence.
      Questions are:
      those ids - are they ItemIds or something else?
      what's wrong with that code above?
      Thank You in advance!

            Unassigned Unassigned
            romans.krjukovs Romans Krjukovs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: