From 048bd5d0cc57ce80d1d236e2c06e3636c81ec428 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Tue, 8 Jan 2019 09:58:53 +0000 Subject: [PATCH] pybind/mgr: allow to specify services for get_all_perf_counters Signed-off-by: Mykola Golub --- src/pybind/mgr/mgr_module.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 7ad331b024245..30df9621f4711 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -939,7 +939,8 @@ class MgrModule(ceph_module.BaseMgrModule): else: return (0, 0) - def get_all_perf_counters(self, prio_limit=PRIO_USEFUL): + def get_all_perf_counters(self, prio_limit=PRIO_USEFUL, + services=("mds", "mon", "osd", "rgw")): """ Return the perf counters currently known to this ceph-mgr instance, filtered by priority equal to or greater than `prio_limit`. @@ -957,7 +958,7 @@ class MgrModule(ceph_module.BaseMgrModule): for server in self.list_servers(): for service in server['services']: - if service['type'] not in ("rgw", "mds", "osd", "mon"): + if service['type'] not in services: continue schema = self.get_perf_schema(service['type'], service['id']) -- 2.39.5