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

host object have wrong data type for the 'status' and 'available' fields

XMLWordPrintable

    • Sprint 60 (Jan 2020), Sprint 61 (Feb 2020), Sprint 62 (Mar 2020), Sprint 63 (Apr 2020), Sprint 64 (May 2020), Sprint 65 (Jun 2020), Sprint 66 (Jul 2020), Sprint 67 (Aug 2020)
    • 0

      The documentation for the host object in the manual page state about the 'available' and 'status' fields:

      available integer (readonly) Availability of Zabbix agent.
       
      Possible values are:
      0 - (default) unknown;
      1 - available;
      2 - unavailable.
      status integer Status and function of the host.
       
      Possible values are:
      0 - (default) monitored host;
      1 - unmonitored host.

      This isn't true, as the host.get API call return a string in those JSON fields and not an integer:

      {"jsonrpc":"2.0","result":[{"hostid":"10502","available":"0","status":"0"}],"id":1}
      

      This can be confusing as people that develop SDK for the zabbix APIs should be aware of
      the additional conversions involved.

      The solution is to fix the documentation.

            martins-v Martins Valkovskis
            abiscuola Andrea Biscuola
            Team D
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: