check_phpfpm_multi regularly on timeout #152

Open
opened 2022-04-01 15:20:07 +02:00 by btatu · 1 comment
Member

Somes servers are this plugins /usr/local/lib/nagios/plugins/check_phpfpm_multi

when there are lots of pool PHP loaded, NRPE reply to an "CHECK_NRPE: Socket timeout after 10 seconds." probably because the execution time is near to 10 seconds :

# time sudo /usr/local/lib/nagios/plugins/check_phpfpm_multi /var/lib/lxc/php70/rootfs/etc/php/7.0/fpm/pool.d/
OK - 1 UNCHK / 0 CRIT / 0 WARN / 57 OK

PHP-FPM OK - tpe, 0.059 sec. response time, Busy/Idle 1/0, (max: 1, reached: 0), ReqPerSec 0.0, Queue 0 (len: 0, reached: 0)
[...]
PHP-FPM OK - usa, 0.058 sec. response time, Busy/Idle 1/0, (max: 1, reached: 0), ReqPerSec 0.0, Queue 0 (len: 0, reached: 0)
UNCHK - www (missing pm.status_path definition)

real	0m8.901s
user	0m7.659s
sys	0m1.632s

Another example :

# time sudo /usr/local/lib/nagios/plugins/check_phpfpm_multi /var/lib/lxc/php73/rootfs/etc/php/7.3/fpm/pool.d/
OK - 1 UNCHK / 0 CRIT / 0 WARN / 46 OK

PHP-FPM OK - connect4good, 0.060 sec. response time, Busy/Idle 1/0, (max: 4, reached: 0), ReqPerSec 0.2, Queue 0 (len: 0, reached: 0)
[...]
PHP-FPM OK - cvtheque, 0.060 sec. response time, Busy/Idle 1/0, (max: 1, reached: 0), ReqPerSec 0.0, Queue 0 (len: 0, reached: 0)
UNCHK - www (missing pm.status_path definition)

real	0m7,586s
user	0m6,465s
sys	0m1,008s

Or when there are only one pool PHP :

# time sudo /usr/local/lib/nagios/plugins/check_phpfpm_multi /var/lib/lxc/php70/rootfs/etc/php/7.0/fpm/pool.d/
OK - 1 UNCHK / 0 CRIT / 0 WARN / 1 OK

PHP-FPM OK - simon, 0.053 sec. response time, Busy/Idle 1/1, (max: 10, reached: 0), ReqPerSec 1.7, Queue 0 (len: 0, reached: 0)
UNCHK - www (missing pm.status_path definition)

real	0m0,202s
user	0m0,156s
sys	0m0,069s

Should we parallelize with xargs (for example) to reduce execution time ?

Somes servers are this plugins `/usr/local/lib/nagios/plugins/check_phpfpm_multi` when there are lots of pool PHP loaded, NRPE reply to an "CHECK_NRPE: Socket timeout after 10 seconds." probably because the execution time is near to 10 seconds : ~~~ # time sudo /usr/local/lib/nagios/plugins/check_phpfpm_multi /var/lib/lxc/php70/rootfs/etc/php/7.0/fpm/pool.d/ OK - 1 UNCHK / 0 CRIT / 0 WARN / 57 OK PHP-FPM OK - tpe, 0.059 sec. response time, Busy/Idle 1/0, (max: 1, reached: 0), ReqPerSec 0.0, Queue 0 (len: 0, reached: 0) [...] PHP-FPM OK - usa, 0.058 sec. response time, Busy/Idle 1/0, (max: 1, reached: 0), ReqPerSec 0.0, Queue 0 (len: 0, reached: 0) UNCHK - www (missing pm.status_path definition) real 0m8.901s user 0m7.659s sys 0m1.632s ~~~ Another example : ~~~ # time sudo /usr/local/lib/nagios/plugins/check_phpfpm_multi /var/lib/lxc/php73/rootfs/etc/php/7.3/fpm/pool.d/ OK - 1 UNCHK / 0 CRIT / 0 WARN / 46 OK PHP-FPM OK - connect4good, 0.060 sec. response time, Busy/Idle 1/0, (max: 4, reached: 0), ReqPerSec 0.2, Queue 0 (len: 0, reached: 0) [...] PHP-FPM OK - cvtheque, 0.060 sec. response time, Busy/Idle 1/0, (max: 1, reached: 0), ReqPerSec 0.0, Queue 0 (len: 0, reached: 0) UNCHK - www (missing pm.status_path definition) real 0m7,586s user 0m6,465s sys 0m1,008s ~~~ Or when there are only one pool PHP : ~~~ # time sudo /usr/local/lib/nagios/plugins/check_phpfpm_multi /var/lib/lxc/php70/rootfs/etc/php/7.0/fpm/pool.d/ OK - 1 UNCHK / 0 CRIT / 0 WARN / 1 OK PHP-FPM OK - simon, 0.053 sec. response time, Busy/Idle 1/1, (max: 10, reached: 0), ReqPerSec 1.7, Queue 0 (len: 0, reached: 0) UNCHK - www (missing pm.status_path definition) real 0m0,202s user 0m0,156s sys 0m0,069s ~~~ Should we parallelize with xargs (for example) to reduce execution time ?
Author
Member

Without this optimization, autosysadmin sometimes restarts a PHP pool but this can be a false positive because there aren't warning or error inside log.

Without this optimization, autosysadmin sometimes restarts a PHP pool but this can be a false positive because there aren't warning or error inside log.
btatu added the
enhancement
label 2022-04-01 15:52:19 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: evolix/ansible-roles#152
No description provided.