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

Limit applied before filter on host.get apparently

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.12
    • Fix Version/s: 2.3.2
    • Component/s: API (A)

      Description

      $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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: