From 924fc5eb02a7e3e53c0951214f0a5ea9cc8bed54 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Fri, 1 Oct 2021 18:01:15 +0200
Subject: [PATCH] update php-fpm-status.ini

---
 php-fpm-status.ini | 110 ++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 93 insertions(+), 17 deletions(-)

diff --git a/php-fpm-status.ini b/php-fpm-status.ini
index 727b925..60993c1 100644
--- a/php-fpm-status.ini
+++ b/php-fpm-status.ini
@@ -17,30 +17,106 @@ check_command = "PHP-FPM-Status"
 
 [phpfpmstatus.urlparams]
 areaAlpha   = "0.2"
-; areaMode    = "stacked"
-areaMode    = "first"
+areaMode    = "stacked"
 
-colorList = "6699aa,ddddee,66cc88,cc66dd,aaaa99,ee4488"
-;            ^      ^      ^      ^      ^      ^ 
-;            active maxa   idle   queue  maxqueue slow
+colorList = "cc66dd,6699ee,ccddff,66cc88"
+;            ^      ^      ^      ^      
+;            queue  run    read   idle   
 lineWidth   = "2"
 min         = "0"
 yUnitSystem = "binary"
+title       = "Count of processes per Worker state"
 
 [phpfpmstatus.metrics_filters]
-active    = "$service_name_template$.perfdata.php-fpm-active.value"
-maxactive = "$service_name_template$.perfdata.php-fpm-maxactive.value"
-idle      = "$service_name_template$.perfdata.php-fpm-idle.value"
 queue     = "$service_name_template$.perfdata.php-fpm-queue.value"
-maxqueue     = "$service_name_template$.perfdata.php-fpm-maxqueue.value"
-slow     = "$service_name_template$.perfdata.php-fpm-slow.value"
+running   = "$service_name_template$.perfdata.php-fpm-running.value"
+reading   = "$service_name_template$.perfdata.php-fpm-reading.value"
+idle      = "$service_name_template$.perfdata.php-fpm-idle.value"
+; active    = "$service_name_template$.perfdata.php-fpm-active.value"
+; maxactive = "$service_name_template$.perfdata.php-fpm-maxactive.value"
+; maxqueue     = "$service_name_template$.perfdata.php-fpm-maxqueue.value"
 
 
 [phpfpmstatus.functions]
-active    = "alias($metric$, 'active')"
-maxactive = "alias($metric$, 'max active')"
-idle      = "alias($metric$, 'idle')"
-queue      = "alias($metric$, 'queue')"
-slow     = "alias($metric$, 'slow')"
-maxqueue      = "alias($metric$, 'max queue')"
-slow     = "alias($metric$, 'slow')"
+queue      = "alias($metric$, 'queue (waiting for a worker)')"
+running    = "alias($metric$, 'Running')"
+reading    = "alias($metric$, 'Reading header')"
+idle      = "alias($metric$,  'Idle')"
+; active    = "alias($metric$, 'active')"
+; maxactive = "alias($metric$, 'max active')"
+; maxqueue      = "alias($metric$, 'max queue')"
+
+
+; ----------------------------------------------------------------------
+; pie graph for workes by state
+; ----------------------------------------------------------------------
+
+[phpfpmstatus-worker-pie.graph]
+check_command = "PHP-FPM-Status"
+
+[phpfpmstatus-worker-pie.urlparams]
+graphType     = "pie"
+
+colorList = "cc66dd,6699ee,ccddff,66cc88"
+;            ^      ^      ^      ^      
+;            queue  run    read   idle   
+title         = "Worker state"
+
+
+[phpfpmstatus-worker-pie.metrics_filters]
+queue     = "$service_name_template$.perfdata.php-fpm-queue.value"
+running   = "$service_name_template$.perfdata.php-fpm-running.value"
+reading   = "$service_name_template$.perfdata.php-fpm-reading.value"
+idle      = "$service_name_template$.perfdata.php-fpm-idle.value"
+; active    = "$service_name_template$.perfdata.php-fpm-active.value"
+; maxactive = "$service_name_template$.perfdata.php-fpm-maxactive.value"
+; queue     = "$service_name_template$.perfdata.php-fpm-queue.value"
+; maxqueue     = "$service_name_template$.perfdata.php-fpm-maxqueue.value"
+; slow     = "$service_name_template$.perfdata.php-fpm-slow.value"
+
+
+[phpfpmstatus-worker-pie.functions]
+queue      = "alias($metric$, 'queue (waiting for a worker)')"
+running    = "alias($metric$, 'Running')"
+reading    = "alias($metric$, 'Reading header')"
+idle       = "alias($metric$,  'Idle')"
+; active    = "alias($metric$, 'active')"
+; maxactive = "alias($metric$, 'max active')"
+; slow     = "alias($metric$, 'slow')"
+; maxqueue      = "alias($metric$, 'max queue')"
+; slow     = "alias($metric$, 'slow')"
+
+; ----------------------------------------------------------------------
+; pie graph for speed and slow
+; ----------------------------------------------------------------------
+
+[phpfpmstatus-speed-pie.graph]
+check_command = "PHP-FPM-Status"
+
+[phpfpmstatus-speed-pie.urlparams]
+areaAlpha   = "0.2"
+; areaMode    = "stacked"
+areaMode    = "first"
+
+colorList = "6699ee,ee4488"
+;            ^      ^      
+;            speed slow
+lineWidth   = "2"
+min         = "0"
+yUnitSystem = "binary"
+title       = "Processed and slow requests per min"
+
+[phpfpmstatus-speed-pie.metrics_filters]
+speed       = "$service_name_template$.perfdata.php-fpm-speed.value"
+slow        = "$service_name_template$.perfdata.php-fpm-slow.value"
+
+
+[phpfpmstatus-speed-pie.functions]
+speed       = "alias($metric$, 'Reqests')"
+slow        = "alias($metric$, 'Slow requests')"
+; active    = "alias($metric$, 'active')"
+; maxactive = "alias($metric$, 'max active')"
+; queue      = "alias($metric$, 'queue')"
+; slow     = "alias($metric$, 'slow')"
+; maxqueue      = "alias($metric$, 'max queue')"
+; slow     = "alias($metric$, 'slow')"
-- 
GitLab