From 96fe35d3bf36f4bc5200f60f71d04de95e090f6c Mon Sep 17 00:00:00 2001 From: Vinit Mahedia Date: Wed, 9 Dec 2015 13:07:55 -0800 Subject: [PATCH] Reverse type instance name for readability --- marathon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/marathon.py b/marathon.py index 0e4fbcc..7daea87 100644 --- a/marathon.py +++ b/marathon.py @@ -83,7 +83,10 @@ def dispatch_stat(type, name, value): val = collectd.Values(plugin='marathon') val.type = type if CLEAN_METRICS: - name = name.replace('mesosphere.marathon.', '') + name = name.replace('mesosphere.marathon.', '') + name_parts = name.split('.') + name_parts.reverse() + name = ".".join(name_parts) val.type_instance = name val.values = [value] # https://github.com/collectd/collectd/issues/716