From: Benoît Knecht Date: Fri, 12 Nov 2021 14:07:35 +0000 (+0100) Subject: pybind/mgr/mgr_module.py: Set instance_id label for rgw X-Git-Tag: v18.0.0~1460^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9f6573bbb1eeed8fab117149a117fdffd56bdf64;p=ceph-ci.git pybind/mgr/mgr_module.py: Set instance_id label for rgw Now that the RadosGW returns its instance ID instead of its daemon name, replace the `ceph_daemon` label with an `instance_id` label on the `rgw` metrics. Signed-off-by: Benoît Knecht --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 657cf2cceff..d8d19a7b0d4 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -1296,7 +1296,13 @@ class MgrModule(ceph_module.BaseMgrModule, MgrModuleLoggingMixin): def _perfpath_to_path_labels(self, daemon: str, path: str) -> Tuple[str, Tuple[str, ...], Tuple[str, ...]]: - label_names = ("ceph_daemon",) # type: Tuple[str, ...] + if daemon.startswith('rgw.'): + label_name = 'instance_id' + daemon = daemon[len('rgw.'):] + else: + label_name = 'ceph_daemon' + + label_names = (label_name,) # type: Tuple[str, ...] labels = (daemon,) # type: Tuple[str, ...] if daemon.startswith('rbd-mirror.'):