From: Zack Cerza Date: Thu, 14 Sep 2017 22:03:00 +0000 (-0600) Subject: Mon._get_df_stats(): Sanitize pool names X-Git-Tag: v1.0~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=208003b2a0c10370cf071ddd6234e1f835b46b2b;p=cephmetrics.git Mon._get_df_stats(): Sanitize pool names _get_pool_stats() already replaces '.' with '_'; let's copy that behavior Signed-off-by: Zack Cerza --- diff --git a/collectors/mon.py b/collectors/mon.py index d6052a8..7c4f09b 100644 --- a/collectors/mon.py +++ b/collectors/mon.py @@ -432,6 +432,8 @@ class Mon(BaseCollector): def _get_df_stats(self): """ get 'ceph df' stats from rados """ raw_stats = self._mon_command('df') + for pool in raw_stats['pools']: + pool['name'] = pool['name'].replace('.', '_') return raw_stats def _get_pool_stats(self):