From d2c6bedf3603ac0d1dda7848aa5543943f273284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Ramalho?= Date: Fri, 19 May 2017 09:31:28 -0300 Subject: [PATCH] Fix load plugin dimension This change removes a line that set the dimension to be None. In that way, the dimensions of the measurement can be set through the plugin configuration file. Change-Id: I038ee56f58426a79c27f65427de6d58ca4d0952e --- conf.d/load.yaml | 3 +++ monasca_agent/collector/checks_d/load.py | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conf.d/load.yaml b/conf.d/load.yaml index dc4ea406..75c8e261 100644 --- a/conf.d/load.yaml +++ b/conf.d/load.yaml @@ -5,3 +5,6 @@ init_config: instances: # Load check only supports one configured instance - name: load_stats + # (optional) Additional dimensions to dimensions each metric with + # dimensions: + # dim1: value1 diff --git a/monasca_agent/collector/checks_d/load.py b/monasca_agent/collector/checks_d/load.py index b3ed68a3..cd137e43 100644 --- a/monasca_agent/collector/checks_d/load.py +++ b/monasca_agent/collector/checks_d/load.py @@ -49,8 +49,6 @@ class Load(checks.AgentCheck): # Split out the 3 load average values load = [res.replace(',', '.') for res in re.findall(r'([0-9]+[\.,]\d+)', uptime)] - dimensions = self._set_dimensions(None) - # # Normalize the load averages by number of cores # so the metric is useful for alarming across