Only lowercase mysql slave metrics with metric_version = 2
(cherry picked from commit 8b687a8e21
)
This commit is contained in:
parent
7e25f98eb5
commit
469ba00e7d
|
@ -608,7 +608,9 @@ func (m *Mysql) gatherSlaveStatuses(db *sql.DB, serv string, acc telegraf.Accumu
|
||||||
}
|
}
|
||||||
// range over columns, and try to parse values
|
// range over columns, and try to parse values
|
||||||
for i, col := range cols {
|
for i, col := range cols {
|
||||||
col = strings.ToLower(col)
|
if m.MetricVersion >= 2 {
|
||||||
|
col = strings.ToLower(col)
|
||||||
|
}
|
||||||
if value, ok := m.parseValue(*vals[i].(*sql.RawBytes)); ok {
|
if value, ok := m.parseValue(*vals[i].(*sql.RawBytes)); ok {
|
||||||
fields["slave_"+col] = value
|
fields["slave_"+col] = value
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue