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

Improve TimescaleDB support and missing data handling

    XMLWordPrintable

Details

    • Change Request
    • Status: Open
    • Medium
    • Resolution: Unresolved
    • 5.0.6
    • None
    • Server (S)
    • None

    Description

      https://docs.timescale.com/latest/api#locf

      There is currently no option to define what value should be used when viewing graphs if there are missing data points.

      The users should have option to select null, last value or arbitrary value. TimescaleDB supports such functionality builtin functions. Assuming the SQL query can have the collection interval of the item loaded.

      https://docs.timescale.com/latest/api#locf

      SELECT
        time_bucket_gapfill('1 day', time, now() - INTERVAL '1 week', now()) AS day,
        device_id,
        avg(temperature) AS value,
        locf(avg(temperature))
      FROM metrics
      WHERE time > now () - INTERVAL '1 week'
      GROUP BY day, device_id
      ORDER BY day;
      
                 day          | device_id | value | locf
      ------------------------+-----------+-------+------
       2019-01-10 01:00:00+01 |         1 |       |
       2019-01-11 01:00:00+01 |         1 |   5.0 |  5.0
       2019-01-12 01:00:00+01 |         1 |       |  5.0
       2019-01-13 01:00:00+01 |         1 |   7.0 |  7.0
       2019-01-14 01:00:00+01 |         1 |       |  7.0
       2019-01-15 01:00:00+01 |         1 |   8.0 |  8.0
       2019-01-16 01:00:00+01 |         1 |   9.0 |  9.0
      (7 row)
      

      and
      https://docs.timescale.com/latest/api#time_bucket_gapfill

       

      The same functionality can be used with the API and also can be used to resolve

      https://support.zabbix.com/browse/ZBX-16162

      If zabbix supports this feature in a lower level than fixing problems iwth graphs,, then tools using Zabbix API to produce graphs can also benefit from it and also produce correct graphs.

       

      Tools like Grafana and it's postgresql/mysql data sources support such filling functionality. Eg.

      https://grafana.com/docs/grafana/latest/datasources/postgres/

      Attachments

        Activity

          People

            wiper Andris Zeila
            yurtesen Evren Yurtesen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: