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

API host.get doesn't return any inventory data

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • None
    • 2.2.0
    • API (A)
    • Linux xxx-web01 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
      mysql Ver 14.14 Distrib 5.5.33, for Linux (x86_64) using readline 5.1

      I'm not able to get any inventory data through the official Zabbix API:

      $json = {
      jsonrpc => "2.0",
      method => "host.get",
      params =>

      { withInventory => "true", templateids => XYZ, selectInventory => "true", output => "extend", sortfield => 'name', }

      ,
      id => 2,
      auth => "$authID"
      };

      Zabbix API Inventory only returns the hostid:

      $VAR1 = [
      {
      'maintenances' => [],
      'jmx_available' => '0',
      'jmx_errors_from' => '0',
      'snmp_error' => '',
      'ipmi_authtype' => '-1',
      'ipmi_username' => '',
      'jmx_error' => '',
      'name' => 'XXXXXXX',
      'ipmi_error' => '',
      'maintenanceid' => '0',
      'errors_from' => '0',
      'ipmi_password' => '',
      'ipmi_privilege' => '2',
      'maintenance_type' => '0',
      'maintenance_status' => '0',
      'templates' => [

      { 'templateid' => '0', 'hostid' => '0' }

      ],
      'status' => '0',
      'lastaccess' => '0',
      'hostid' => '10329',
      'ipmi_errors_from' => '0',
      'ipmi_available' => '0',
      'disable_until' => '0',
      'proxy_hostid' => '0',
      'error' => '',
      'snmp_disable_until' => '0',
      'maintenance_from' => '0',
      'available' => '0',
      'jmx_disable_until' => '0',
      'inventory' =>

      { 'hostid' => '10329' }

      ,
      'flags' => '0',
      'snmp_available' => '1',
      'host' => 'XXXXXXX',
      'snmp_errors_from' => '0',
      'ipmi_disable_until' => '0'
      },

            Unassigned Unassigned
            remo Remo Stäuble
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: