mysql plugin: don't emit blank tags

closes #201
This commit is contained in:
Cameron Sparr 2015-09-16 14:04:14 -07:00
parent 3be6d84675
commit 66ed4f7328
1 changed files with 2 additions and 0 deletions

View File

@ -144,6 +144,8 @@ func (m *Mysql) gatherServer(serv string, acc plugins.Accumulator) error {
var servtag string
if strings.Contains(serv, "@") {
servtag = strings.Split(serv, "@")[1]
} else if serv == "" {
servtag = "localhost"
} else {
servtag = serv
}