EasyApache 4 PHP-FPM Status Page
Hi there,
I am wondering if there is a way for me to access the PHP-FPM status page of any particular PHP-FPM pool within the WHM interface just like how we can access the Apache Status page as easily within WHM?
I notice that pm.status_path is currently pointing to /status in all my config files of all my pools. /opt/cpanel/ea-php54/root/etc/php-fpm.d/[domain].conf :
Allowing for this will enable me to easily monitor the usage of all my pools:
An added bonus will be if the page can show with the /status?full option to allow me to view more details on the processes within the pool.
pm.status_path = /status
Allowing for this will enable me to easily monitor the usage of all my pools:
pool: www
process manager: dynamic
start time: 17/May/2016:13:54:02 +0530
start since: 886617
accepted conn: 1619617
listen queue: 0
max listen queue: 0
listen queue len: 0
idle processes: 28
active processes: 2
total processes: 30
max active processes: 31
max children reached: 0
slow requests: 0
An added bonus will be if the page can show with the /status?full option to allow me to view more details on the processes within the pool.
-
Hello, There's no feature in WHM to show the PHP-FPM status page at this time. I encourage you to submit a feature request to allow for that functionality via: Submit A Feature Request Thanks! 0 -
I was messing around with this today and this is a pretty simple thing to do. I added this to my domains configuration in httpd.conf with Easy Apache4. You could likely make an include file for this instead. The proxy_fcgi_module section already exists. I added SetHandler proxy:unix:/opt/cpanel/ea-php56/root/usr/var/run/php-fpm/c71e80857422fac3e2c4db73c2eb615bedb15678.sock|fcgi://disc4life.com/ order deny,allow deny from all #allow from 10.20.4.4 allow from 10.20.4.0/22 SetHandler proxy:unix:/opt/cpanel/ea-php56/root/usr/var/run/php-fpm/c71e80857422fac3e2c4db73c2eb615bedb15678.sock|fcgi://disc4life.com/ Now I can visit /status and /status?full or /ping on my domain and it shows the FPM status for my domain. Rules are here to deny / allow access as well based on IP. Good luck. 0 -
Any update on this? We would like to have a supported method as well! 0 -
Any update on this? We would like to have a supported method as well!
There's no update at this time, however I encourage you to vote and add feedback to the existing feature request for this at: EasyApache 4 PHP-FPM Status Page for Individual Pools Thanks!0 -
There is pretty easy way to achieve this without much configuration: - ]
- add or change status path to end with .phtml like, you may add pm_status_path: /status.phtml to /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml
- than rebuild FPM configuration files with /scripts/php_fpm_config --rebuild
- than create file status.phtml in each website root with simple content like ,file must exist so the request is forwarded to FPM
- to finish just restart PHP-FPM daemons
0 -
Hi. I've tried this on my machines and not work. I think I made a mistake in the process. vi /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml --- php_admin_flag_allow_url_fopen: 'on' php_admin_flag_log_errors: 'on' php_admin_value_disable_functions: "\"\"" php_admin_value_doc_root: "\"[% documentroot %]/\"" php_admin_value_error_log: "[% homedir %]/logs/[% scrubbed_domain %].php.error.log" php_admin_value_short_open_tag: 'on' php_value_error_reporting: E_ALL & ~E_NOTICE pm_max_children: 5 pm_max_requests: 20 pm_process_idle_timeout: 10 pm_status_path = "/status.phtml" ping_path = "/ping"
/scripts/php_fpm_config --rebuild.... info [php_fpm_config] rebuild_files: working on domain (arch.domain.com) info [php_fpm_config] rebuild_files: working on domain (test.domain.com) info [php_fpm_config] php-fpm: rebuild_files: restart fpm services for Apache info [php_fpm_config] php-fpm: fpm services restarted info [php_fpm_config] Rebuilding vhosts in apache conf info [php_fpm_config] Rebuild Complete
Check changes fails cat /opt/cpanel/ea-php72/root/etc/php-fpm.d/domain.com.conf
;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; cPanel FPM Configuration ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; NOTICE This file is generated. Please use our WHM User Interface ; to set these values. [domain_com] catch_workers_output = yes chdir = /home/domain group = "domain" listen = /opt/cpanel/ea-php72/root/usr/var/run/php-fpm/e519794b34f5a594b0441b0b59a73fd7cca77e21.sock listen.group = "nobody" listen.mode = 0660 listen.owner = "domain" php_admin_flag[allow_url_fopen] = on php_admin_flag[log_errors] = on php_admin_value[doc_root] = "/home/domain/public_html/" php_admin_value[error_log] = /home/domain/logs/domain_com.php.error.log php_admin_value[short_open_tag] = on php_value[disable_functions] = "" php_value[error_reporting] = E_ALL & ~E_NOTICE ping.path = /ping pm = ondemand pm.max_children = 100 pm.max_requests = 750 pm.max_spare_servers = 5 pm.min_spare_servers = 1 pm.process_idle_timeout = 150 pm.start_servers = 0 pm.status_path = /status security.limit_extensions = .phtml .php .php3 .php4 .php5 .php6 .php7 .php8 user = "domain"
pm.status_path show /path instead /status.pthml After restart php-fpm, get 404 for Also if create a status.phtml0 -
@speckados - it's important to note the details provided so far aren't official workarounds provided by cPanel, so I can't say for sure if they work across version changes and updates to our software. It might be best to open a ticket with our Technical Support team to see if there are other options available to get this configured. 0
Please sign in to leave a comment.
Comments
7 comments