FPM status with OpenMetrics format and FULL parameter
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
Hi,
at the first - thank for your job.
About issue: we use PHP 8.1.9 in k8s + prometheus.
Now we try to migrate from hipages/php-fpm_exporter:2.2.0-amd64 (https://github.com/hipages/php-fpm_exporter) to https://www.php.net/manual/en/fpm.status.php
https://localhost/fpm-status?full - this route returns all data what we want to track/monitor.
We use prometheus.
So, we try to read fpm-status in prometheus format.
https://localhost/fpm-status?openmetrics - this route returns some.
https://localhost/fpm-status?openmetrics&full - this route returns the same data like from https://localhost/fpm-status?openmetrics. It's mean that we can't see additional (like in https://localhost/fpm-status?full).
Looks like is expected behavior according with https://github.com/php/php-src/blob/master/sapi/fpm/fpm/fpm_status.c#L431 -
full_syntax = "";
Do have any plans about setting/adding correct data for case with prometheus format (like for TEXT - https://github.com/php/php-src/blob/master/sapi/fpm/fpm/fpm_status.c#L456)?
Thank you
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in sapi/fpm/fpm_status.c at the referenced lines around 431 and 456, and reproduce the /fpm-status?openmetrics and /fpm-status?openmetrics&full responses. Compare how the full parameter is handled for TEXT versus OpenMetrics output. Done means the OpenMetrics response exposes the additional data returned by the full status view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, prometheus
- Domain
- backend, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100