]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
Mon._get_df_stats(): Sanitize pool names 120/head
authorZack Cerza <zack@redhat.com>
Thu, 14 Sep 2017 22:03:00 +0000 (16:03 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 14 Sep 2017 22:03:00 +0000 (16:03 -0600)
_get_pool_stats() already replaces '.' with '_'; let's copy that
behavior

Signed-off-by: Zack Cerza <zack@redhat.com>
collectors/mon.py

index d6052a86f5d195e2b9de1469d924286995ada9ec..7c4f09bc5e750334bc03d108d73a143ec464d234 100644 (file)
@@ -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):