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

Item created by API in template has a NULL in the "interfaceid" in the real inherited host

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 1.9.8 (beta)
    • 1.9.3 (alpha)
    • API (A)
    • latest trunk rev 18820
      Host already linked to template before creating item by API.

      as result - items in the real host does not start to monitor because it has no interface in the DB.
      Host availability is marked as "Invalid port number []"

      Item created by zabcon.
      Request:
      raw json {"auth":"$auth","method":"item.create","id":163,"params":

      {"hostid":10098,"type":0,"value_type":3,"delay":60,"history":10,"description":"Test key created by API","key_":"test.echo[my_test_text]"}

      ,"jsonrpc":"2.0"}
      Answer:
      {:class=>:raw, :result=>{"itemids"=>["25447"]}}

      DB (item in the host):
      mysql> SELECT `key_`, `description`, `interfaceid` FROM `items` WHERE `itemid` =25449;
      -----------------------------------------------------------

      key_ description interfaceid

      -----------------------------------------------------------

      test.echo[my_test_text] Test key created by API NULL

      -----------------------------------------------------------
      1 row in set (0,00 sec)

            Unassigned Unassigned
            zalex_ua Oleksii Zagorskyi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: