From 9db3c1f388c6fa19033334e136aa16cdca936ce6 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Fri, 1 Oct 2021 12:10:00 +0200
Subject: [PATCH] update php-fpm check using full status now

---
 check_php-fpm-status | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/check_php-fpm-status b/check_php-fpm-status
index 7cbfb03..b75805f 100755
--- a/check_php-fpm-status
+++ b/check_php-fpm-status
@@ -76,8 +76,10 @@ status page.
 For performance data it eachos:
 
     php-fpm-active     count of active workers
-    php-fpm-maxactive  max active processes
-    php-fpm-idle       count of idle workers
+    php-fpm-maxactive  max active processes (sum of idle + running + reading)
+    php-fpm-idle       count of workers in state "Idle"
+    php-fpm-running    count of workers in state "Running"
+    php-fpm-reading    count of workers in state "Reading headers"
     php-fpm-queue      count of items in the queue
     php-fpm-maxqueue   max listen queue
     php-fpm-slow       slow requests per second (since last execution of this check)
@@ -136,6 +138,11 @@ if [ $? -ne 0 ]; then
 fi
 
 # ----------------------------------------------------------------------
+# get values from status output
+# ----------------------------------------------------------------------
+
+# --- handled requests per sec
+typeset -i iConn=$(      _getvalue "accepted conn")
 typeset -i iSpeed=$(     ph.perfdeltaspeed "fpm-accepted" $iConn )
 
 # --- count slots
-- 
GitLab