grafana-zabbix icon indicating copy to clipboard operation
grafana-zabbix copied to clipboard

Metric values appear to be interpolated for large time ranges

Open AndyFug opened this issue 5 months ago • 0 comments

Describe the bug When querying metrics that only contain integer values, the plugin will sometimes return floats that appear to be averaged/interpolated values. This appears to be when larger datasets are requested (longer time ranges).

Example NB: Examples are based on a 'Time series' panel type, but I have seen similar behaviour on all panel types and in 'Explore' mode. I should also add that I get the same behaviour even when only a single server's metrics are being selected.

Number of running processes on 3x Linux Servers (Last 12 hours): Image

Number of running processes on 3x Linux Servers (Last 24 hours): Image

The second example above shows what I can only describe as 'interpolated' values that aren't accurate representations of the source data (0.500 etc).

Query settings: Image I have also tried enabling/disabling data alignment and changing the Trends setting. None of these seem to change the behaviour.

Data Source Settings: Image As well as the above configuration, I have also tried without using the Direct DB connetion and enabling/disabling trends and data alignment.

Expected behavior I don't expect values in Grafana to be interpolated. In some dashboards I rely on discrete values + thresholds to indicate the state of something. Interpolated values clearly contribute to misleading representations of the data. I expect the values to be the same as those in Zabbix.

Network data Request (in fault state): { "queries": [ { "schema": 12, "queryType": "0", "group": { "filter": "TG/Servers" }, "host": { "filter": "/.*ddm.*/" }, "application": { "filter": "" }, "itemTag": { "filter": "" }, "item": { "filter": "Number of running processes" }, "macro": { "filter": "" }, "functions": [], "trigger": { "filter": "" }, "countTriggersBy": "", "tags": { "filter": "" }, "proxy": { "filter": "" }, "textFilter": "", "evaltype": "0", "options": { "showDisabledItems": false, "skipEmptyValues": false, "disableDataAlignment": true, "useZabbixValueMapping": false, "useTrends": "false", "count": false }, "table": { "skipEmptyValues": false }, "refId": "A", "resultFormat": "time_series", "datasource": { "type": "alexanderzobnin-zabbix-datasource", "uid": "P494A6D3D65609D72" }, "datasourceId": 40, "intervalMs": 120000, "maxDataPoints": 500 } ], "range": { "from": "2025-05-12T10:05:15.939Z", "to": "2025-05-13T10:05:15.939Z", "raw": { "from": "now-24h", "to": "now" } }, "from": "1747044315939", "to": "1747130715939" }

Partial Response (in fault state): { "results": { "A": { "status": 200, "frames": [ { "schema": { "name": "ae-ddmnode1: Number of running processes", "refId": "A", "fields": [ { "name": "Time", "type": "time", "typeInfo": { "frame": "time.Time" } }, { "name": "Value", "type": "number", "typeInfo": { "frame": "float64", "nullable": true }, "labels": { "host": "ae-ddmnode1", "item": "Number of running processes", "item_key": "proc.num[,,run]" }, "config": { "displayNameFromDS": "ae-ddmnode1: Number of running processes", "custom": { "scopedVars": { "__zbx_host": { "text": "", "value": "ae-ddmnode1" }, "__zbx_host_id": { "text": "", "value": "11412" }, "__zbx_host_name": { "text": "", "value": "ae-ddmnode1" }, "__zbx_item": { "text": "", "value": "Number of running processes" }, "__zbx_item_interval": { "text": "", "value": "1m" }, "__zbx_item_key": { "text": "", "value": "proc.num[,,run]" }, "__zbx_item_name": { "text": "", "value": "Number of running processes" } }, "units": "" } } } ] }, "data": { "values": [ [ 1747044480000, 1747044600000, 1747044720000, 1747044840000, 1747044960000, 1747045080000, 1747045200000, 1747045320000, 1747045440000, 1747045560000, 1747045680000, 1747045800000, 1747045920000, 1747046040000, 1747046160000, 1747046280000, 1747046400000, 1747046520000, 1747046640000, 1747046760000 ], [ 0, 0, 0, 1, 0, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 0, 1.5, 0, 0.5 ] ] } } ] } } }

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
11.3.1 7.2.3 5.1.0

AndyFug avatar May 13 '25 10:05 AndyFug