From 1455b8b2321da364b68a9f4fc717f72b1ebdf5ba Mon Sep 17 00:00:00 2001
From: Fulvio Galeazzi <fulvio.galeazzi@garr.it>
Date: Wed, 6 Feb 2019 19:01:05 +0100
Subject: [PATCH] 2019-02-05:  FG;  Try to fix error with broken pipe.

---
 Ceph/Script/cephHealth.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Ceph/Script/cephHealth.pl b/Ceph/Script/cephHealth.pl
index 3cdfdbb..b11af66 100755
--- a/Ceph/Script/cephHealth.pl
+++ b/Ceph/Script/cephHealth.pl
@@ -183,7 +183,7 @@ if ($sumDo > 1) {
 
 # Fetch the "pg dump" data and put it in an array
 if ($doOsdFullth + $doOsdNearFullth + $doOsdBackfillFullth) {
-    my @_pgdata = `$cephCmd osd dump | head -20 2> /dev/null`;
+    my @_pgdata = `$cephCmd osd dump | tail -n +1 | head -20 2> /dev/null`;
     chomp @_pgdata;
     foreach my $_pgline (@_pgdata) {
 	if ($doOsdFullth) {
-- 
GitLab