From 4e2122479fc36c063b160daa122b9ff62bf42ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 9 Apr 2024 20:29:31 +0200 Subject: [PATCH] Add version in php pool name to avoid muliple pool with same name --- conf/monitorix.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/conf/monitorix.conf b/conf/monitorix.conf index 5c0b047..b9e8a68 100644 --- a/conf/monitorix.conf +++ b/conf/monitorix.conf @@ -1001,13 +1001,18 @@ secure_log_date_format = %b %e 0 = Apps detected pools - 0 = {% for php_pool_info in php_pools_infos.splitlines() %}{% if loop.index > 1 %}, {% endif %}{{ php_pool_info.split(',')[1] }}{% endfor %} + 0 = {% for php_pool_info in php_pools_infos.splitlines() -%} + {%- if loop.index > 1 -%}, {%- endif -%} + {%- set phpversion = php_pool_info.split(',')[0] -%} + {%- set pool_name = php_pool_info.split(',')[1] -%} + {{- pool_name }}-{{ phpversion -}} + {%- endfor %} {%- for php_pool_info in php_pools_infos.splitlines() %} {%- set phpversion = php_pool_info.split(',')[0] %} {%- set pool_name = php_pool_info.split(',')[1] %} - {{ pool_name }} = http://localhost:{{ port_nginx_status }}/php-pool-status/php{{ phpversion }}-fpm-{{ pool_name }} + {{ pool_name }}-{{ phpversion }} = http://localhost:{{ port_nginx_status }}/php-pool-status/php{{ phpversion }}-fpm-{{ pool_name }} {%- endfor %}