From 33cacc71b8f9ee101266c047e0b3fb867ba4b641 Mon Sep 17 00:00:00 2001 From: Anthony Brodard Date: Wed, 18 May 2016 15:17:14 +0200 Subject: [PATCH] Add role tag to redis plugins (#1207) fixes #1203 - Format code --- plugins/inputs/redis/redis.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/inputs/redis/redis.go b/plugins/inputs/redis/redis.go index 859b23a22..dee564c73 100644 --- a/plugins/inputs/redis/redis.go +++ b/plugins/inputs/redis/redis.go @@ -74,6 +74,7 @@ var Tracking = map[string]string{ "used_cpu_user": "used_cpu_user", "used_cpu_sys_children": "used_cpu_sys_children", "used_cpu_user_children": "used_cpu_user_children", + "role": "role", } var ErrProtocolError = errors.New("redis protocol error") @@ -206,6 +207,11 @@ func gatherInfoOutput( keyspace_misses = ival } + if name == "role" { + tags["role"] = val + continue + } + if err == nil { fields[metric] = ival continue