From: John Spray Date: Tue, 26 Jul 2016 12:59:19 +0000 (+0100) Subject: pybind/mgr: expose get_counter in MgrModule X-Git-Tag: v11.0.1~60^2~34 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=80281ed245575484c3709ed71935dd1cd3d1e1a0;p=ceph.git pybind/mgr: expose get_counter in MgrModule Signed-off-by: John Spray --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 725af381ca05..19e135c6824a 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -102,6 +102,18 @@ class MgrModule(object): """ return ceph_state.get_server(self._handle, hostname) + def get_counter(self, svc_type, svc_name, path): + """ + Called by the plugin to fetch data for a particular perf counter + on a particular service. + + :param svc_type: + :param svc_name: + :param path: + :return: A list of two-element lists containing time and value + """ + return ceph_state.get_counter(self._handle, svc_type, svc_name, path) + def list_servers(self): """ Like ``get_server``, but instead of returning information