hipages / php-fpm_exporter

A prometheus exporter for PHP-FPM.
Apache License 2.0
579 stars 111 forks source link

problem with cpu utilizationand phpfpm_process_last_request_cpu #342

Open freedomwarrior opened 6 months ago

freedomwarrior commented 6 months ago

I'm trying to understand how the metric phpfpm_process_last_request_cpu works.

I created a simple docker-compose app with nginx, php-fpm and simple php stress test script. Also, I monitor docker with cadvisor. When I run a stress test, I see that a single php-fpm process utilizes 100% of the container CPU and I can see this on a graph of the cadvisorexporter. But metric phpfpm_process_last_request_cpu did not show this utilisation, I always see 0 value with short spikes. At this screenshot, top graph is phpfpm_process_last_request_cpu and bottom graph is cadvisor cpu usage of container. image So, does phpfpm_process_last_request_cpu must reflect real CPU usage or I just misunderstood this metric? Thank you.