From 81b84fb12b67d4f673c83e6db4d3042e416774c7 Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Thu, 19 May 2022 16:26:29 +0100 Subject: [PATCH] fix: avoid calling sadc with invalid 0 interval (#11140) --- plugins/inputs/sysstat/sysstat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inputs/sysstat/sysstat.go b/plugins/inputs/sysstat/sysstat.go index a5c67cded..8499e925d 100644 --- a/plugins/inputs/sysstat/sysstat.go +++ b/plugins/inputs/sysstat/sysstat.go @@ -122,7 +122,7 @@ func (s *Sysstat) collect(tempfile string) error { collectInterval := s.interval - parseInterval // If true, interval is not defined yet and Gather is run for the first time. - if collectInterval < 0 { + if collectInterval <= 0 { collectInterval = 1 // In that case we only collect for 1 second. }