From 16fe4795b3db7799586ce249e3d3e045065f609a Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Tue, 1 Jun 2021 13:16:22 +0300 Subject: [PATCH] Disable alignment for trend data --- pkg/datasource/zabbix.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/datasource/zabbix.go b/pkg/datasource/zabbix.go index 345c5cb..e61a0ad 100644 --- a/pkg/datasource/zabbix.go +++ b/pkg/datasource/zabbix.go @@ -101,7 +101,8 @@ func (ds *ZabbixDatasourceInstance) queryNumericDataForItems(ctx context.Context series := convertHistoryToTimeSeries(history, items) // Align time series data if possible - if query.Options.DisableDataAlignment == false && ds.Settings.DisableDataAlignment == false { + useTrend := ds.isUseTrend(query.TimeRange) + if !query.Options.DisableDataAlignment && !ds.Settings.DisableDataAlignment && !useTrend { for _, s := range series { if s.Meta.Interval != nil { s.TS = s.TS.Align(*s.Meta.Interval)