improve mntr regex to match user specific keys. (#7533)

* improve mntr regex to match user specific keys.

* Update plugins/inputs/zookeeper/zookeeper.go

Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>

Co-authored-by: guoxu <guoxu@chinatelecom.cn>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
This commit is contained in:
Shawn Guo 2021-01-28 04:39:28 +08:00 committed by GitHub
parent 8707a2d847
commit 5c4c0e1494
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ import (
"github.com/influxdata/telegraf/plugins/inputs"
)
var zookeeperFormatRE = regexp.MustCompile(`^zk_(\w+)\s+([\w\.\-]+)`)
var zookeeperFormatRE = regexp.MustCompile(`^zk_(\w[\w\.\-]*)\s+([\w\.\-]+)`)
// Zookeeper is a zookeeper plugin
type Zookeeper struct {