[ZBX-18468] Template App PHP-FPM by Zabbix agent Ping item Created: 2020 Oct 08 Updated: 2024 Apr 10 Resolved: 2021 Jan 18 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 5.0.4 |
Fix Version/s: | 5.0.8rc1, 5.2.4rc1, 5.4.0alpha1, 5.4 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | Maksim Astapenko | Assignee: | Maxim Chudinov (Inactive) |
Resolution: | Fixed | Votes: | 1 |
Labels: | PHP-FPM | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
CentOS 8 x64 Zabbix server 5.0.4 |
Attachments: |
![]() ![]() ![]() |
Team: | |
Sprint: | Sprint 72 (Jan 2021) |
Story Points: | 1 |
Description |
Steps to reproduce:
Result: 4 pong 0 Test on many servers with nginx and apache |
Comments |
Comment by Dragan Janjusevic [ 2020 Dec 20 ] |
Took me few hours to nail it Error is in Preprocessing rule for dependent item: PHP-FPM: Get Ping page: PHP-FPM: Ping with key php-fpm.ping. Preprocessing regexp parameter for that item should read: {$PHP_FPM.PING.REPLY} instead of {$PHP_FPM.PING.REPLY}$ I suppose it's because /ping page returns "0" at the end so regexp with "$" at the end never matches. |
Comment by Maksim Astapenko [ 2020 Dec 21 ] |
When the command is called curl -L 127.0.0.1/ping run on the server, it does not return "0", there is not even a line feed, only the word pong |
Comment by Oleg Gawriloff [ 2020 Dec 26 ] |
Yes. But running master item gives us what Dragan shows: ubuntu@nextcloud:~$ sudo zabbix_get -s nextcloud.managed-it.a1.by -p 10050 --tls-connect psk --tls-psk-identity "nextcloud" --tls-psk-file /etc/zabbix/zabbix_agentd.psk -k web.page.get["localhost","ping","80"] 4
|
Comment by Maxim Chudinov (Inactive) [ 2021 Jan 12 ] |
Available in:
|
Comment by NIKITA [ 2021 Feb 05 ] |
I updated the plugin but it still doesn't work for me. The answer is the same 4
|
Comment by Maksim Astapenko [ 2021 Jun 02 ] |
To make it work, you need to say nginx chunked_transfer_encoding off; http://nginx.org/ru/docs/http/ngx_http_core_module.html#chunked_transfer_encoding Nginx conf: location ~ ^/(status|ping)$ { access_log off; ## Only allow trusted IPs for security, deny everyone else allow 127.0.0.1; deny all; chunked_transfer_encoding off; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_index index.php; include fastcgi_params; fastcgi_pass unix:/run/php-fpm/www.sock; } Apache config:
<Location /ping>
Require local
SetEnv downgrade-1.0
ProxyPass unix:/run/php-fpm/www.sock|fcgi://localhost/ping
</Location>
|
Comment by Maksim Astapenko [ 2021 Jun 10 ] |
For Ubuntu users - https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/420083-bug-report-php-fpm-process-is-not-running |
Comment by MASATO HIRAHATA [ 2021 Dec 16 ] |
I had a similar problem. I think it would be desirable to add line "chunked_transfer_encoding off;" to the README. |