X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fpybind%2Fmgr%2Fmgr_module.py;h=2463bafe75d8a11e73e6d9f012cfbfc277b2cc01;hb=c07f9fc5a4f48397831383549fb0482b93480643;hp=9d3362d75e922ec9d72915e6817da91d4fafddc7;hpb=9439ae556f035e65c9c107ae13ddd09457dbbecd;p=ceph.git diff --git a/ceph/src/pybind/mgr/mgr_module.py b/ceph/src/pybind/mgr/mgr_module.py index 9d3362d75..2463bafe7 100644 --- a/ceph/src/pybind/mgr/mgr_module.py +++ b/ceph/src/pybind/mgr/mgr_module.py @@ -111,6 +111,18 @@ class MgrModule(object): """ return ceph_state.get_server(self._handle, hostname) + def get_perf_schema(self, svc_type, svc_name): + """ + Called by the plugin to fetch perf counter schema info. + svc_name can be nullptr, as can svc_type, in which case + they are wildcards + + :param svc_type: + :param svc_name: + :return: list of dicts describing the counters requested + """ + return ceph_state.get_perf_schema(self._handle, svc_type, svc_name) + def get_counter(self, svc_type, svc_name, path): """ Called by the plugin to fetch data for a particular perf counter @@ -157,6 +169,30 @@ class MgrModule(object): """ ceph_state.send_command(self._handle, *args, **kwargs) + def set_health_checks(self, checks): + """ + Set module's health checks + + Set the module's current map of health checks. Argument is a + dict of check names to info, in this form: + + { + 'CHECK_FOO': { + 'severity': 'warning', # or 'error' + 'summary': 'summary string', + 'detail': [ 'list', 'of', 'detail', 'strings' ], + }, + 'CHECK_BAR': { + 'severity': 'error', + 'summary': 'bars are bad', + 'detail': [ 'too hard' ], + }, + } + + :param list: dict of health check dicts + """ + ceph_state.set_health_checks(self._handle, checks) + def handle_command(self, cmd): """ Called by ceph-mgr to request the plugin to handle one