This plugin is currently being groomed to be an integration. It works, but we haven’t spent a lot of time on it yet to optimize the user experience. Feel free to try it out, just keep in mind that we will be enhancing the experience over time.
PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation. This plugin will retrieve phpfpm stats using either HTTP status page or fpm socket.
php-fpm plugin is included with the AppOptics host agent by default. Please follow the directions below to enable it for a host agent instance.
You’ll need to have an Apache server with PHP-FPM accessible. Take note of the host address, port, and password (if set). This will be needed later in the configuration step.
The host agent provides an example configuration file to help you get started quickly. It defines the plugin and task file to be loaded by the agent, but requires you to provide the correct settings for your PHP-FPM installation. To enable the plugin:
- Make a copy of the PHP-FPM example configuration file
/opt/appoptics/etc/plugins.d/phpfpm.yaml.example, renaming it to
$ sudo cp /opt/appoptics/etc/plugins.d/phpfpm.yaml.example /opt/appoptics/etc/plugins.d/phpfpm.yaml
- Edit the configuration file with settings specific to your PHP-FPM install:
$ sudo nano /opt/appoptics/etc/plugins.d/phpfpm.yaml
In this configuration you’ll notice that it is already configured to listen on
localhost by using the setting
urls: "http://localhost/status". Update this line to specify the server address to listen on.
collector: phpfpm: all: ## An array of addresses to gather stats about. Specify an ip or hostname ## with optional port and path ## ## Plugin can be configured in three modes (either can be used): ## - http: the URL must start with http:// or https://, ie: ## "http://localhost/status" ## "http://192.168.130.1/status?full" ## ## - unixsocket: path to fpm socket, ie: ## "/var/run/php5-fpm.sock" ## or using a custom fpm status path: ## "/var/run/php5-fpm.sock:fpm-custom-status-path" ## ## - fcgi: the URL must start with fcgi:// or cgi://, and port must be present, ie: ## "fcgi://10.0.0.12:9000/status" ## "cgi://10.0.10.12:9001/status" ## ## Example of multiple gathering from local socket and remove host ## urls: "http://192.168.1.20/status,/tmp/fpm.sock" urls: "http://localhost/status" load: plugin: snap-plugin-collector-bridge-phpfpm task: task-bridge-phpfpm.yaml
Save your changes and return to the command prompt.
- Restart the agent after any configuration changes have been made:
$ sudo service appoptics-snapteld restart
- Enable the PHP-FPM plugin
On the Integrations Page you will see PHP-FPM available if the previous steps were successful. It may take a couple minutes before the PHP-FPM plugin is identified.
Select the PHP-FPM plugin to open the configuration menu in the UI, and enable the plugin.