You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function consolidateBy(sum) should calculate sum over the data points returned from Zabbix database to Grafana. It works well when querying from history tables (time range being less than the Range setting in plugin settings) but calculates invalid values when querying from trends (from longer time ranges).
The produced SQL query can be debugged in network traffic:
SELECT itemid AS metric, clock DIV 7200 * 7200 AS time_sec, SUM(value_avg) AS value FROM trends_uint WHERE itemid IN (282744, 282835) AND clock > 1531999580 AND clock < 1532604380 GROUP BY clock DIV 7200 * 7200, metric ORDER BY time_sec ASC
The query shows that Zabbix plugin actually sums up the average values from trends_uint table, meaning that it sums up one-hour averages instead of summing up the actual data inside those one-hour trend periods.
Zabbix trend tables do have the capability to get the sum of actual data inside the one-hour period. Zabbix stores the number of datapoints inside the one-hour trend period into num field and the average value in value_avg field, meaning that the sum of values inside the one-hour trend period can be acquired by num*value_avg.
The text was updated successfully, but these errors were encountered:
I'm submitting a ...
For bug report please include this information:
Software Versions
What did you do?
The function consolidateBy(sum) should calculate sum over the data points returned from Zabbix database to Grafana. It works well when querying from history tables (time range being less than the Range setting in plugin settings) but calculates invalid values when querying from trends (from longer time ranges).
The produced SQL query can be debugged in network traffic:
The query shows that Zabbix plugin actually sums up the average values from trends_uint table, meaning that it sums up one-hour averages instead of summing up the actual data inside those one-hour trend periods.
Zabbix trend tables do have the capability to get the sum of actual data inside the one-hour period. Zabbix stores the number of datapoints inside the one-hour trend period into
num
field and the average value invalue_avg
field, meaning that the sum of values inside the one-hour trend period can be acquired bynum*value_avg
.The text was updated successfully, but these errors were encountered: