Skip to content

Commit

Permalink
fix: avoid calling sadc with invalid 0 interval (influxdata#11140)
Browse files Browse the repository at this point in the history
  • Loading branch information
thatsafunnyname authored May 19, 2022
1 parent 7c89a38 commit 81b84fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inputs/sysstat/sysstat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

Expand Down

0 comments on commit 81b84fb

Please sign in to comment.