Skip to content

Commit

Permalink
Fix global variable collection when using interval_slow option in mys…
Browse files Browse the repository at this point in the history
…ql input (#3500)
  • Loading branch information
lgosselin authored and danielnelson committed Nov 27, 2017
1 parent e3812e9 commit 5ae114b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions plugins/inputs/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,17 +588,12 @@ func (m *Mysql) gatherServer(serv string, acc telegraf.Accumulator) error {

// Global Variables may be gathered less often
if len(m.IntervalSlow) > 0 {
if uint32(time.Since(lastT).Seconds()) > scanIntervalSlow {
if uint32(time.Since(lastT).Seconds()) >= scanIntervalSlow {
err = m.gatherGlobalVariables(db, serv, acc)
if err != nil {
return err
}
lastT = time.Now()
} else {
err = m.gatherGlobalVariables(db, serv, acc)
if err != nil {
return err
}
}
}

Expand Down

0 comments on commit 5ae114b

Please sign in to comment.