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

JSON host.create inventory problem

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 2.2.15rc1, 3.0.5rc1, 3.2.0beta2
    • 3.0.2
    • API (A)
    • FreeBSD 10.0-RELEASE-p4 FreeBSD 10.0-RELEASE-p4 #0: Tue Jun 3 13:14:57 UTC 2014 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64

      When creating host via API inventory_mode parameter is ignoring.

      $x='{
          "jsonrpc": "2.0",
          "method": "host.create",
          "params": {
              "host": "'.$cgi->param('hostname').'",
              "interfaces": [
                               {
                                "dns" : "",
                                "ip" : "'.$cgi->param('IP').'",
                                "port" : "10050",
                                "main" : 1,
                                "useip" : 1,
                                "type" : 1
      
                              },
                              {
                                "dns" : "",
                                "ip" : "'.$cgi->param('IP').'",
                                "port" : "161",
                                "main" : 1,
                                "useip" : 1,
                                "type" : 2
      
                              }
              ],
      
              "description":"'.$newdescr.'",
              "groups": [
              '.$groups_for_adding.'
      
              ],
              "templates": [
                  {
                      "templateid": "'.$cgi->param('template').'"
                  }
              ],
              "inventory_mode": 1
      
      
      
          },
          "id": 2,
          "auth": "xxxx"
      }';
      

      When i open created host via web inventory mode in "Disabled".

            Unassigned Unassigned
            s.vekli@hitel.ru Vekli Sergey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: