From: Mykola Golub Date: Tue, 8 Jan 2019 09:58:53 +0000 (+0000) Subject: pybind/mgr: allow to specify services for get_all_perf_counters X-Git-Tag: v14.1.0~429^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=048bd5d0cc57ce80d1d236e2c06e3636c81ec428;p=ceph.git pybind/mgr: allow to specify services for get_all_perf_counters Signed-off-by: Mykola Golub --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 7ad331b0242..30df9621f47 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'])