From 280ec15b792f78aa5bc410bb4ff49af7a74f397e Mon Sep 17 00:00:00 2001 From: Paul Cuzner Date: Thu, 8 Oct 2020 16:35:45 +1300 Subject: [PATCH] mgr: add doc to describe relationship to prometheus The healthcheck for slow_ops is used by the mgr/prometheus module so it's important the alert generated matches the format expected in mgr/prometheus. Signed-off-by: Paul Cuzner (cherry picked from commit fc1905b4a74aedc6bdbc928b6d6e514183bbf090) Conflicts: src/mgr/DaemonHealthMetricCollector.cc - docstring added to describe the link to mgr/prometheus conflicted with the const fmt definition for the message. resolved by adding doc under the const definition. --- src/mgr/DaemonHealthMetricCollector.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mgr/DaemonHealthMetricCollector.cc b/src/mgr/DaemonHealthMetricCollector.cc index 09d98e51c484b..1c3dc431c40f3 100644 --- a/src/mgr/DaemonHealthMetricCollector.cc +++ b/src/mgr/DaemonHealthMetricCollector.cc @@ -55,6 +55,8 @@ class SlowOps final : public DaemonHealthMetricCollector { return; } static const char* fmt = "%1% slow ops, oldest one blocked for %2% sec, %3%"; + // Note this message format is used in mgr/prometheus, so any change in format + // requires a corresponding change in the mgr/prometheus module. ostringstream ss; if (daemons.size() > 1) { if (daemons.size() > 10) { -- 2.39.5