[ZBX-21304] PHP-FPM template php-fpm.ping reports false down Created: 2022 Jul 05 Updated: 2024 Apr 10 Resolved: 2022 Sep 08 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Templates (T) |
Affects Version/s: | 6.0.6, 6.2.0 |
Fix Version/s: | 5.0.28rc1, 6.0.9rc1, 6.2.3rc1, 6.4.0alpha1, 6.4 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | Jerzy Drożdż | Assignee: | Denis Rasikhov |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Team: | |
Sprint: | Sprint 92 (Sep 2022) |
Story Points: | 1 |
Description |
Both "PHP-FPM by HTTP" and "PHP-FPM by Zabbix agent" are affected. Steps to reproduce:
Result: php-fpm.ping = "Down(0)" Expected:
Resolution: Change regular expression in preprocessing for php-fpm.ping: from: {$PHP_FPM.PING.REPLY}($|\n) to: {$PHP_FPM.PING.REPLY}($|\r?\n) |
Comments |
Comment by Denis Rasikhov [ 2022 Sep 05 ] |
Hi t0fik ! I've tested both templates with the following setups: 1. Rocky Linux 8.6, Zabbix 6.2.2:
2. Rocky Linux 8.6, Zabbix 6.0.6
3. Debian 11, Zabbix 5.0.24:
4. Debian 11, Zabbix 6.2.2:
I've set up Zabbix to monitor PHP-FPM on itself (same VM) and I could not reproduce the error in any of the specified configs, it works as expected. Could you give more details about the environment you have? |
Comment by Jerzy Drożdż [ 2022 Sep 05 ] |
Setup: Zabbix server 6.0.8 (AlmaLinux 8.6):
Monitored host (AlmaLinux 8.6), different VM:
Virtual host configuration: <VirtualHost [::]:80> ServerName localhost <Location "/server-status"> SetHandler server-status </Location> <Location ~ "^/(status|ping)$"> SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost" </Location> </VirtualHost> Data processed by regex are raw HTTP server response with '\r\n' EOLs. Adding '\r?' to the regular expression is backward compatible. |
Comment by Denis Rasikhov [ 2022 Sep 06 ] |
The reason behind these line endings is usage of agent 2. Probably it was made this way for compatibility with Windows or something. Yeah, we'll add optional "\r" to the regex then. |
Comment by Jerzy Drożdż [ 2022 Sep 06 ] |
Nice to hear. CRLF is standard EOL for HTTP message, maybe agent2 do not convert that. I've got whole HTTP message (headers + body) to parse by regular expression. IMHO no data conversion is a good thing in this case.
|
Comment by Denis Rasikhov [ 2022 Sep 06 ] |
Fixed in:
|