From faf63472ea3f911d8911d558f9f1d50852862c4d Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Fri, 4 Nov 2016 10:02:09 -0400 Subject: [PATCH] Added Questions status variable to mysql input --- plugins/inputs/mysql/mysql.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/inputs/mysql/mysql.go b/plugins/inputs/mysql/mysql.go index ece5e1447..5cf19f2db 100644 --- a/plugins/inputs/mysql/mysql.go +++ b/plugins/inputs/mysql/mysql.go @@ -828,6 +828,13 @@ func (m *Mysql) gatherGlobalStatuses(db *sql.DB, serv string, acc telegraf.Accum } 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": i, err := strconv.ParseInt(string(val.([]byte)), 10, 64) if err != nil {