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

Limit applied before filter on host.get apparently

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 2.3.2
    • 2.0.12
    • API (A)

      $filterOptions = array(
      'maintenance_status' => HOST_MAINTENANCE_STATUS_ON,
      'status' => HOST_STATUS_MONITORED
      );

      $hosts = API::Host()->get(array(
      'output' => array('name', 'maintenanceid'),
      'groupids' => $filter['groupids'],
      'filter' => $filterOptions,
      'sortfield' => 'name',
      'limit' => isset($filter['limit']) ? $filter['limit'] : 10
      ));

      Using a limit of 10 is getting me only 4 results, while I get 7 (the actual number!) when I remove the limit or raise it to say 100. I would expect 7 results with a limit of 10.

            Unassigned Unassigned
            volter Volker Fröhlich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: