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

Invalid arguments for interface in Host.create API method

XMLWordPrintable

    • Sprint 66 (Jul 2020), Sprint 67 (Aug 2020)

      Steps to reproduce:

      When I try to add host into zabbix via API (using pyzabbix) like this:

      zabbix.host.create({
       "name": host_name,
       "host": host_name,
       "interfaces": [
      { "type": 2, "main": 1, "useip": 1, "ip": hostip, "dns": "", "port": "161" }
      ],
       "groups": [
      { "groupid": "15" }
      ],
       "templates": [
      { "templateid": "10186" }
      ]
      }) 

       

      I see the exception:

      pyzabbix.ZabbixAPIException: ('Error -32602: Invalid params., Incorrect arguments passed to function.', -32602)

       

      If I choose the "type" 1(3,4) - all ok.

      This works in version 4.4 but does not work in version 5.0

            iivs Ivo Kurzemnieks
            Masken Masken
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: