diff --git a/pkg/syslog-ng-ctl/stats_prometheus.go b/pkg/syslog-ng-ctl/stats_prometheus.go index 28150a9..e46bac1 100644 --- a/pkg/syslog-ng-ctl/stats_prometheus.go +++ b/pkg/syslog-ng-ctl/stats_prometheus.go @@ -129,9 +129,9 @@ func transformEventDelayMetric(delayMetric *io_prometheus_client.MetricFamily, d delayMetric := m if d, ok := delayMetricAgeByLabel[fmt.Sprint(m.Label)]; ok { - delayMetricAge := d.GetGauge().GetValue() + delayMetricAge := int(d.GetGauge().GetValue()) - lastDelaySampleTS := now.Add(time.Duration(-delayMetricAge * float64(time.Second))) + lastDelaySampleTS := now.Add(time.Duration(-delayMetricAge) * time.Second) if lastDelaySampleTS.After(lastMetricQueryTime) { timestampMs := timestamp.FromTime(lastDelaySampleTS) transformedMetric = append(transformedMetric,