From 5a4b2e45aa019cc35f5ca581029fafeccf641d90 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Thu, 23 Sep 2021 11:51:29 +0200
Subject: [PATCH] update php-fpm check

---
 check_php-fpm-status | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/check_php-fpm-status b/check_php-fpm-status
index 218f799..10d267d 100755
--- a/check_php-fpm-status
+++ b/check_php-fpm-status
@@ -154,19 +154,24 @@ fi
 # --- output
 ph.status "PHP-FPM: active: $iActive (max: $iMaxActive) .. wait: $iIdle .. queue: $iQueue (max: $iMaxQueue) .. speed: $iSpeed req per sec"
 
+hint="HINT: the non-OK status is still erxperimmental. A warning can be a false positive.\n\n"
 if [ $iIdle -eq 0 ]; then
-        echo "WARNING: $iIdle idle workers available."
-        echo "         Maybe there is a current peak only."
-        echo "         Or count of allowed workers (pm.max_children) or spare servers (pm.XXX_spare_servers) is too low."
+    echo $hint
+    echo "WARNING: $iIdle idle workers available."
+    echo "         Maybe there is a current peak only."
+    echo "         Or count of allowed workers (pm.max_children) or spare servers (pm.XXX_spare_servers) is too low."
 fi
 if [ $iQueue -gt 0 ]; then
-        echo "WARNING: $iQueue queued requests were found."
+    echo $hint
+    echo "WARNING: $iQueue queued requests were found."
 fi
 if [ $iSlow -gt 0 ]; then
-        echo "WARNING: $iSlow slow requests were found."
+    echo $hint
+    echo "WARNING: $iSlow slow requests were found."
 fi
 if [ $iMaxChilds -gt 0 ]; then
-        echo "WARNING: max. children was reached $iMaxChilds. Max. active were $iMaxActive - maybe count of allowed workers is too low."
+    echo $hint
+    echo "WARNING: max. children was reached $iMaxChilds. Max. active were $iMaxActive workers - maybe count of allowed workers (pm.max_children) is too low."
 fi
 echo
 cat $tmpfile
-- 
GitLab