From e6b19fc9400a8df5ebfd731a09fd38e300a2e1ea Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Thu, 28 Nov 2019 12:14:09 +0300 Subject: [PATCH] [fix] correct grep of pool name #10 --- zabbix/zabbix_php_fpm_discovery.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zabbix/zabbix_php_fpm_discovery.sh b/zabbix/zabbix_php_fpm_discovery.sh index d6956d8..9489b2f 100644 --- a/zabbix/zabbix_php_fpm_discovery.sh +++ b/zabbix/zabbix_php_fpm_discovery.sh @@ -45,7 +45,7 @@ POOL_FIRST=0 echo -n "{\"data\":[" while IFS= read -r line do - POOL_PID=`printf '%s\n' "${PS_LIST[@]}" | $S_GREP "php-fpm: pool $line" | $S_HEAD -1 | $S_AWK '{print $1}'` + POOL_PID=`printf '%s\n' "${PS_LIST[@]}" | $S_GREP "php-fpm: pool $line$" | $S_HEAD -1 | $S_AWK '{print $1}'` if [[ ! -z $POOL_PID ]]; then #We search for socket or IP address and port #Socket example: