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

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Trivial
    • None
    • Affects Version/s: 4.0.2
    • Component/s: 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.

            Assignee:
            Unassigned
            Reporter:
            Aigars Kadikis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: