Add Questions status variable for issue: #1988 (#2004)

This commit is contained in:
Pierre Tessier 2016-12-16 08:47:47 -05:00 committed by Cameron Sparr
parent bc13d32d53
commit 4a83c8c518
1 changed files with 7 additions and 0 deletions

View File

@ -828,6 +828,13 @@ func (m *Mysql) gatherGlobalStatuses(db *sql.DB, serv string, acc telegraf.Accum
} }
fields["queries"] = i fields["queries"] = i
case "Questions":
i, err := strconv.ParseInt(string(val.([]byte)), 10, 64)
if err != nil {
return err
}
fields["questions"] = i
case "Slow_queries": case "Slow_queries":
i, err := strconv.ParseInt(string(val.([]byte)), 10, 64) i, err := strconv.ParseInt(string(val.([]byte)), 10, 64)
if err != nil { if err != nil {