Commit 54c14ce
committed
feat(php-fpm-status)!: multi-pool support and rework of alerting
`--url` can now be specified multiple times to check several pools
on the same host in one plugin run; overall state is the worst of
all pools. Basic auth is supported per URL via embedded userinfo
(`http://user:pw@host/path`), delegated to lib.url.split_basic_auth
from linuxfabrik-lib 3.2.0. All perfdata labels are now prefixed
with the pool name in `<pool>_snake_case` form, matching the
procs / disk-io convention now documented in CONTRIBUTING.md.
The wrongly-named `queue usage` metric has been renamed to
`saturation` and now correctly reports `active / total worker
processes` instead of the socket backlog fill rate. The cumulative
counters `accepted conn` and `slow requests` have been replaced by
`<pool>_accepted_conn_rate` (req/s) and `<pool>_slow_requests_delta`
(new since last run), following the "no continuous counters" rule
in CONTRIBUTING and making the slow-request thresholds actually
actionable. The `max children reached` metric and its implicit
WARN have been removed and will return later with delta semantics.
New `--severity warn|crit` parameter controls the state reported
for unreachable pools (default warn). `--lengthy` now defaults
to off and in --lengthy includes idle workers in the process table
so the table is always populated, even on quiet pools.
Process-table formatting has been made friendlier for narrow
Icinga views: request URIs are stripped of their query strings
(just `?` is kept as a visual cue), script paths are abbreviated
by reducing every directory component to its first character
(`/usr/share/icingaweb2/public/index.php` → `/u/s/i/p/index.php`),
request durations are shown at millisecond precision (no µs
noise), and worker start times drop seconds and the trailing
"ago".
CONTRIBUTING.md documents the snake_case perfdata label
preference with the `re.sub(r'\W+', '_', name)` sanitizer recipe
for per-instance prefixes.
Unit tests run against real PHP-FPM status JSON captured from
UBI8/PHP 7.2, UBI9/PHP 8.0, Debian 12/PHP 8.2, and Ubuntu 24.04/
PHP 8.3 containers.
BREAKING CHANGE: perfdata labels renamed to <pool>_snake_case;
Grafana dashboards using this plugin need updating (the bundled
dashboard has been rewritten to use a $pool template variable).1 parent e7c00d1 commit 54c14ce
File tree
23 files changed
+1359
-365
lines changed- check-plugins/php-fpm-status
- grafana
- icingaweb2-module-director
- unit-test
- stdout
23 files changed
+1359
-365
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
| 636 | + | |
| 637 | + | |
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
642 | | - | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| |||
0 commit comments