]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: allow to specify services for get_all_perf_counters
authorMykola Golub <mgolub@suse.com>
Tue, 8 Jan 2019 09:58:53 +0000 (09:58 +0000)
committerMykola Golub <mgolub@suse.com>
Thu, 10 Jan 2019 10:36:45 +0000 (10:36 +0000)
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/pybind/mgr/mgr_module.py

index 7ad331b0242452e1076791304a355e804f84070a..30df9621f47114424bee1f9b0c87e2d4dce0ef9f 100644 (file)
@@ -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'])