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

List disabled hosts via API, host.get, monitored_hosts=0

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 4.0.2
    • API (A), Frontend (F)
    • None

      I'm using API to list Monitored(Enabled) and not monitored hosts.

      Listing count of enabled hosts works with:

      hosts_en = zapi.host.get(monitored_hosts=1, output=["hostid", "name"])
      print 'Monitored hosts: \t',len(hosts_en)

      Cannot list count for disabled hosts:

      hosts_dis = zapi.host.get(monitored_hosts=0, output=["hostid", "name"])
      print 'Un Monitored hosts: \t',len(hosts_dis)

      In the second case, it also reports the active host count.

      Expected

      while using flag 'monitored_hosts=0' it should report disabled hosts.

            Unassigned Unassigned
            aigars.kadikis Aigars Kadikis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: