support memory peak value which is introduced in PHP 8.4 on mackerel-plugin-php-fpm #1254
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PHP 8.4 introduces new field
memory peak
for php-fpm status page.https://github.com/php/php-src/blob/0454901ed1518cfb42bc77ac91728591b58c3e6e/UPGRADING#L339
The memory usage peak since FPM started.
This PR subjects to add new metric and graph def to support it on mackerel-plugin-php-fpm plugin.
Since memory peak does not fit into the existing PHP-FPM plugin graph definition, I have added a new one.
Max Active Processes is a similar graph that keeps the peaks since PHP-FPM was started, so I used that as a reference. However, I changed the units to bytes.
To avoid creating meaningless graphs in versions older than PHP 8.4, I have coded to not send out a metric when the value of a field cannot be retrieved (=0).
This would mean that the graph would not be generated even when it was really 0 (e.g. after startup). However, rather than introduce the complexity of checking if it is nil or not, I believe it is no problem since a positive value will be entered as soon as PHP-FPM is called.
~PHP8.3
status?json
PHP8.4
status?json
PHP8.3

PHP8.4

Definition
