regilero / check_phpfpm_status

Nagios check for php-fpm status report
GNU General Public License v3.0
39 stars 19 forks source link

Added support for connecting to an UNIX socket #22

Open magenbrot opened 5 years ago

magenbrot commented 5 years ago

Hi @regilero!

Here's a merge request that adds support for UNIX sockets. Notes: when --unixsocket is used, -f --fastcgi is implied

root@nginx1-ha1:/usr/lib/nagios/plugins# ./check_phpfpm_status.pl -H 127.0.0.1 --fastcgi --unixsocket /run/php/php7.1-fpm.sock -u /fpm-status -w 1,1,1 -c 0,2,2
PHP-FPM OK - www, 0.051 sec. response time, Busy/Idle 1/149, (max: 1, reached: 0), ReqPerSec 0.0, Queue 0 (len: 0, reached: 0)|Idle=149 Busy=1 MaxProcesses=1 MaxProcessesReach=0 Queue=0 MaxQueueReach=0 QueueLen=0 ReqPerSec=0.000000
regilero commented 5 years ago

Hello, I'll need to test that, but at first impression it seems good. Thanks. Hope I can take some time soon to review it more deeply.