]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: split pool_id by '.' instead of choosing the first character
authorLaura Flores <lflores@redhat.com>
Tue, 10 Aug 2021 18:40:32 +0000 (18:40 +0000)
committerLaura Flores <lflores@redhat.com>
Tue, 10 Aug 2021 18:40:32 +0000 (18:40 +0000)
Signed-off-by: Laura Flores <lflores@redhat.com>
src/pybind/mgr/telemetry/module.py

index a5c8cc6200d53ecdf3bc6b57a7dc64370dfef956..06cbed9c26ef33271c0222452b06589d954da417 100644 (file)
@@ -340,7 +340,7 @@ class Module(MgrModule):
             # their stats
             pg_dump = self.get('pg_dump')
             for pg in pg_dump['pg_stats']:
-                pool_id = pg['pgid'][0:1]
+                pool_id = pg['pgid'].split('.')[0]
                 if pool_id == curr_pool_id:
                     for metric in pg['stat_sum']:
                         compiled_stats_dict['pool_id'] = int(pool_id)