From 48e102609c968d22faa7213bab0abdeccdf5c04c Mon Sep 17 00:00:00 2001 From: Sachin Rase Date: Sun, 4 Sep 2016 13:55:36 -0700 Subject: [PATCH] adding metadata "dc" Adding dc to every entry , still Todo - exposing rmq.drops , rmq.parsed to _internal measurement with timestamp , server , dc --- plugins/inputs/rabbit_mq_parser/rabbit_mq_parser.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/inputs/rabbit_mq_parser/rabbit_mq_parser.go b/plugins/inputs/rabbit_mq_parser/rabbit_mq_parser.go index 9395deba0..db407e6c4 100644 --- a/plugins/inputs/rabbit_mq_parser/rabbit_mq_parser.go +++ b/plugins/inputs/rabbit_mq_parser/rabbit_mq_parser.go @@ -568,6 +568,9 @@ func structureKey(key string, value interface{}) (string, map[string]string, map field := fmt.Sprintf("%v.%v.%v.%v", s[1], s[2], sp[3], sp[4]) fields[field] = value } + //Adding Datacenter as first 4 letter of hostname + tags["dc"] = tag["host"][:4] + // Return the start of a point return meas, tags, fields }