PHP-FPM monitoring with Netdata

What is PHP-FPM?

PHP-FPM is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.

Monitoring PHP-FPM with Netdata

The prerequisites for monitoring PHP-FPM with Netdata are to have PHP-FPM and Netdata installed on your system.

Netdata auto discovers hundreds of services, and for those it doesn’t turning on manual discovery is a one line configuration. For more information on configuring Netdata for PHP-FPM monitoring please read the collector documentation.

You should now see the PHP-FPM section on the Overview tab in Netdata Cloud already populated with charts about all the metrics you care about.

Netdata has a public demo space (no login required) where you can explore different monitoring use-cases and get a feel for Netdata.

What PHP-FPM metrics are important to monitor - and why?

Connections

Connections metrics measure how many requests are currently in the queue. This is useful for understanding how busy the server is and whether or not it has the capacity for more requests. The three dimensions active, max_active, and idle represent the number of currently active connections, the maximum number of connections that were active at the same time, and the number of idle connections, respectively. All of these metrics are measured in terms of number of connections.

Requests

Requests metrics measure the number of requests handled by the server per second. This is useful for understanding how busy the server is and is a good indicator of the server’s performance. The metric ‘requests’ is measured in terms of requests/s.

Performance

Performance metrics measure how well the server is performing. The metric max_children_reached indicates the number of requests that have been rejected due to the server reaching its maximum capacity. The metric slow_requests indicates the number of requests that took longer than a specified threshold (default of 5 seconds) to process. Both of these metrics are measured in terms of status.

Request Duration

Request duration metrics measure the time it takes for requests to be processed by the server. The three dimensions min, max, and avg represent the minimum, maximum, and average request duration, respectively. All of these metrics are measured in terms of milliseconds.

Request CPU

Request CPU metrics measure the amount of CPU used by requests. The three dimensions min, max, and avg represent the minimum, maximum, and average CPU usage for requests, respectively. All of these metrics are measured in terms of percentage.

Request Memory

Request memory metrics measure the amount of memory used by requests. The three dimensions min, max, and avg represent the minimum, maximum, and average memory usage for requests, respectively. All of these metrics are measured in terms of KB.

Monitoring and observability of these metrics can help prevent server outages and performance issues by giving you an understanding of the server’s capacity, performance, and resource utilization. By tracking these metrics, you can identify trends that may indicate an issue before it becomes a problem. Additionally, monitoring and observability of these metrics can help you optimize the performance of the server by identifying areas that may need improvement.

The observability platform companies need to succeed

Sign up for free

Want a personalised demo of Netdata for your use case?

Book a Demo