PHP FPM: Monitoring PHP FPM with OpsDash

Quick Start

1. Install the OpsDash Smart Agent on the server (typically where the FPM daemon is running). If you need instructions for how to do this, here they are:  Debian/UbuntuCentOS/RHELGeneric.

2. Enable the status URL for the FPM pool, by setting: 

pm.status_path = /status

in the appropriate configuration file (e.g. /etc/php-fpm.d/www.conf or /etc/php/7.0/fpm/pool.d/www.conf). Depending on your setup, you may also need to make more changes in the configuration of Apache/Nginx/other webserver fronting the FPM daemon. Reload or restart of the FPM and web server processes may be required.

3. Edit the OpsDash Smart Agent configuration file at /etc/opsdash/agent.cfg and add a new service:

# choose a good, unique name for the service (here my-fpm-www is used)
service "my-fpm-www" {
    type = "php-fpm"
    url = "http://127.0.0.1/path/to/status"
}

4. Reload the OpsDash Smart Agent so that it picks up the new configuration:

sudo service opsdash-agent reload

4. You should see the service my-fpm-www appear under https://app.opsdash.com/sources within a minute or so. Clicking on it should take you to the dashboard at https://app.opsdash.com/source/my-fpm-www. If it does not, check the agent log file at /var/log/opsdash/agent.log.

Notes

  • You can specify any URL in the configuration, it does not have to be from localhost.
  • The OpsDash Smart Agent will also collect and report metrics of the server itself, where it is installed. This will appear under the "Servers" section on the Sources page.