From fd25a7334b9c73052a50c636f3c6ee45a8591a2b Mon Sep 17 00:00:00 2001
From: Fulvio Galeazzi <fulvio.galeazzi@garr.it>
Date: Wed, 10 Apr 2024 17:26:06 +0200
Subject: [PATCH] 2024-04-10:  FG;  Fix for new health-detail message for slow
 ops.

---
 Ceph/Script/cephHealth.pl | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Ceph/Script/cephHealth.pl b/Ceph/Script/cephHealth.pl
index 036083e..eef4432 100755
--- a/Ceph/Script/cephHealth.pl
+++ b/Ceph/Script/cephHealth.pl
@@ -258,9 +258,17 @@ foreach my $_line (@_data)
 	if ($_line =~ m/ (\d+) requests are blocked/) {
 	    $numSlowReq = $1;
 	}
+	if ($_line =~ m/(\d+) slow ops/) {
+	    $numSlowReq = $1;
+	}
 	if ($_line =~ m/ (\d+) osds have slow requests/) {
 	    $numSlowOsd = $1;
 	}
+	if ($_line =~ m/daemons \[(\S+)\] have slow ops/) {
+	    my @slowOsds = ();
+	    @slowOsds = split(/,/,$1);
+	    $numSlowOsd = @slowOsds;
+	}
 	if ($_line =~ m/ (\d+)\/(\d+) objects misplaced \(([-+]?[0-9]*\.?[0-9]+)\%\)/) {
 	    $objMisplaced = $1;
 	    $objMisplacedFrac = $3;
-- 
GitLab