Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-656

New parameter for granularity in history.get

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 1.8.4
    • API (A)

      When retrieving history data through the JSON-RPC API, dealing with data from a wide lapse of time is painful because all the samples are returned, but it's very likely that I don't need such degree of detail.

      Take, for example, a use case where I want to draw a chart for one year history. I will need, at most, one sample for each pixel of the chart's width, and not all history.

      I propose creating an additional parameter to express the number of samples you want to get. It would divide the history in N groups of the same time length and return an average value for each group. It's different from the limit parameter, which only returns the first N rows of the history.

      Since it's an important feature for me, I've started working on a patch that I'll upload here soon. I'm taking inspiration from frontend/php/include/classes/class.cchart.php, function selectData(), which is used to gather history data to build charts in the web frontend.

            Unassigned Unassigned
            jaragunde Jacobo Aragunde Pérez
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: