Inspired by the munin plugin.
It enables you to see charts for active/idle processes of the fpm pool.
This script is a porting it to the monitoring panel on Google Cloud Console.
- Make a copy config-example.php as config.php and edit it to point the correct location of php-fpm status URL.
- Run script with your credential json file as an env like:
> GOOGLE_APPLICATION_CREDENTIALS=/path/to/my-google-service.json php ./main.php
- Check the Monitoring section on Google Cloud Console.
php_fpm
entries can be found atMetric Explorer
>Global
>Custom Metrics
. - Register it as a cron or systemd-timer script, to run every 5 minutes.