[ZBXNEXT-1503] introduce default limit for "history.get" method to save performance Created: 2012 Nov 08  Updated: 2025 Feb 07

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: API (A)
Affects Version/s: 2.0.3
Fix Version/s: None

Type: Change Request Priority: Minor
Reporter: Oleksii Zagorskyi Assignee: Unassigned
Resolution: Unresolved Votes: 3
Labels: api, history, performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

this is follow-up from ZBX-4363

Without such default limit this method is potential performance killer.

Maybe the "limit" parameter should be required but not the optional?

If it missing I suggest the default limit = 1000
or a limit taken form global frontend configuration option "Search/Filter elements limit" <- it used at the moment in history of latest data page.

To discard any limits an user could specify "limit":0

Optionally:
if the limit is reached then we could return additional field in result which will inform user that there are additional values for requested period - see ZBX-3296



 Comments   
Comment by Oleksii Zagorskyi [ 2014 Jan 31 ]

ZBXNEXT-2132 asks for offset (pagination) support.

Comment by Jan Garaj [ 2016 Mar 14 ]

The same performance killer is trend.get.

Hands-on case - Zabbix.org DDoS:

1.) Go to http://monitoringartist.github.io/zapix/ and connect to zabbix.org as guest (https://raw.githubusercontent.com/monitoringartist/zapix/gh-pages/doc/zabbix-zapix.gif)

2.) Execute trend.get query (~1 query per second or ~20x in one go) and ignore any response errors about exhausted memory

=> Zabbix UI will be down - error "Can't connect to DB".

Comment by Marc [ 2016 Mar 14 ]

ZBXNEXT-1984 is distantly related.

Generated at Sun Apr 05 14:04:27 EEST 2026 using Jira 10.3.18#10030018-sha1:5642e4ad348b6c2a83ebdba689d04763a2393cab.