Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c97a4c2
feat(summary): count absent counter lines as zero in filesystem sums
somethingwithproof Nov 15, 2026
db08c78
fix(query): serve unknown for a target that is not present
somethingwithproof Nov 15, 2026
1e32049
fix(templates): draw the summary age on the Fill graph
somethingwithproof Nov 15, 2026
974701e
test(alert): run Thold and Maint end to end on the summary
somethingwithproof Nov 15, 2026
5b7bd7e
test: add backup and restore and failure qualification runs
somethingwithproof Nov 15, 2026
1833449
test(scale): measure the plugin at 500 and 2,000 targets
somethingwithproof Nov 15, 2026
33f85f8
docs: add the operator guide and prepare the 0.1.0 package
somethingwithproof Nov 15, 2026
8f141c9
docs(alerting): document Thold and Maint use and the counter limit
somethingwithproof Nov 15, 2026
38d0c8e
docs: add the security self-review and pilot plan, mark milestone 4
somethingwithproof Nov 15, 2026
2384d67
docs(release): say the end-to-end runs are not in CI yet
somethingwithproof Nov 15, 2026
361655c
fix(reader): treat a counter cleared into absence as a reset
somethingwithproof Nov 15, 2026
6818198
fix(lustre): keep a bare counter name unknown, not absent
somethingwithproof Nov 15, 2026
af0a348
fix(install): own only the query files the install wrote
somethingwithproof Nov 15, 2026
ca583da
docs: correct stale alerting, uninstall, and release notes
somethingwithproof Nov 15, 2026
cb28efe
test(e2e): fail replays that ran nothing or proved nothing
somethingwithproof Nov 15, 2026
4eecd40
docs(scale): measure each target count alone
somethingwithproof Nov 15, 2026
2d12ce0
fix(install): record each query file as soon as it is written
somethingwithproof Nov 15, 2026
d12ce4d
test(e2e): use Cacti's rrdtool and clean up a failed scale run
somethingwithproof Nov 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
* text=auto eol=lf
*.rrd binary

# Left out of release archives (git archive, GitHub source downloads); see
# docs/release.md.
/.github export-ignore
/tests export-ignore
/phpstan.neon export-ignore
/phpunit.xml export-ignore
/phpunit-integration.xml export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog

All notable changes are recorded here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The version in `INFO` is the version of the next release; a release is a signed tag of that version (see [docs/release.md](docs/release.md)).

## [0.1.0] - Unreleased

Phase 1, Lustre observation. Not released: pilots on real filesystems, the external security review, and live scale measurements are still open.

### Added

- Plugin install, upgrade, and uninstall through Cacti's plugin API, with a refusal on PHP below 8.2 that leaves Cacti working (milestone 2).
- Registry of filesystems, nodes, and the networks each poller may reach; a background reader per poller that reads Lustre servers over SSH through a fixed forced-command script, `node/pfs-read.sh` (milestone 2).
- A cache of target inventory, condition, capacity, and counters with their freshness, and a health page (milestone 2).
- One Cacti device per filesystem with OST and MDT script server data queries, device, data, and graph templates, five overview graphs, and per-target graphs on demand; counters as DERIVE data sources that read unknown across a reset (milestone 3).
- A per-filesystem summary data source for Thold: fill and imbalance, target counts, capacity totals, filesystem throughput and metadata rates, and data age (milestones 3 and 4).
- Device permissions on every page and admin action, and a `graph_buttons` link from a device's graphs to its filesystem view (milestone 3).
- End-to-end tests with unchanged Thold and Maint releases, target churn and reindex, backup and restore, failure scenarios, and a scale harness (milestone 4).
- Operator guide, alerting guide, release process, security self-review, and pilot plan (milestone 4).

### Changed

- An absent counter line counts as zero in the filesystem sums for a target that is present, in service, and reported its other values in the same read; the per-target value stays unknown ([ADR 0013](docs/decisions/0013-absent-counter-lines-count-as-zero-in-sums.md)).

### Fixed

- A target that a complete read left out serves unknown on its per-target data source at once, instead of its last value until that value went stale.
- The Fill graph did not draw `age`, so Cacti stored no value for it and Thold could not threshold it.

### Known issues

- Thold 1.8.2 thresholds on counter data sources (`read_bytes`, `write_bytes`, `md_ops`) are not supported: an unknown counter interval makes Thold's poller hook fail and Cacti disables Thold ([docs/alerting.md](docs/alerting.md#counters-and-thold-182)).
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

This project is in development; milestone 2 (foundation) is merged and there is no release. Most useful contributions right now are evidence for the research issues in milestone 1 and review of the requirements and open decisions.
This project is in development; milestones 2 and 3 are merged, milestone 4 is code complete pending pilots and an external security review, and there is no release. Most useful contributions right now are evidence for the research issues in milestone 1 and review of the requirements and open decisions.

## Before you start

Expand Down
2 changes: 1 addition & 1 deletion INFO
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
; remote collector; remote_collect:1 alone skips it (docs/research/cacti-core.md).
[info]
name = pfs
version = 0.1.0-dev
version = 0.1.0
longname = Parallel Filesystems
author = "Thomas Vincent (somethingwithproof)"
email = thomasvincent@gmail.com
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Cacti 1.2 plugin that brings parallel filesystem health and load into Cacti: capacity and fill imbalance across targets, per-target throughput, and metadata operation rates. Lustre is the first backend. GPFS (IBM Storage Scale) and BeeGFS follow behind a backend interface. The data lands in ordinary Cacti devices, data sources, and graphs, so Thold and Maint alert on and suppress it unchanged.

> **Status: in development, no release yet.** Milestones 2 (foundation) and 3 (Lustre observation) are merged on `main`. The code installs, upgrades, and uninstalls through Cacti's plugin API and refuses PHP below 8.2. It keeps a registry of filesystems, nodes, and the networks each poller may reach. A background reader on each poller reads its Lustre nodes over SSH through a fixed forced-command script ([node/pfs-read.sh](node/pfs-read.sh)) and caches target inventory, condition, capacity, and counter values with their freshness, plus a per-filesystem summary. Each filesystem becomes a Cacti device with two script server data queries (OSTs and MDTs), the "Parallel Filesystem" device, data, and graph templates, five overview graphs, and per-target graphs on demand. Counters are DERIVE data sources that read unknown across a reset. The view page follows Cacti's device permissions. Thold rate alerts (high thresholds only) and Maint suppression are not yet validated; that is milestone 4. Milestone 1 research is written up from documentation and source; checks that need a real file system are still open, and the plugin has not run against a real Lustre node: the end-to-end run uses fixture node output. The rest of this README describes the design, not shipped behavior.
> **Status: milestone 4, code complete for phase 1, not released.** Milestones 2 (foundation), 3 (Lustre observation), and 4 (alerting and release preparation) are done on `main` or in review. The plugin installs, upgrades, and uninstalls through Cacti's plugin API and refuses PHP below 8.2. A background reader on each poller reads Lustre servers over SSH through a fixed forced-command script ([node/pfs-read.sh](node/pfs-read.sh)) and caches inventory, condition, capacity, and counters with their freshness. Each filesystem becomes a Cacti device with OST and MDT data queries, five overview graphs, per-target graphs on demand, and a summary data source for Thold. Thold v1.8.2 and Maint v1.3, unchanged, alert on and suppress the summary gauges in the end-to-end run; Thold thresholds on counters are not supported with Thold 1.8.2 ([docs/alerting.md](docs/alerting.md)). Every test so far runs on fixture node output in a disposable Cacti: the plugin has not run against a real Lustre node. Still open before a release: pilots on real filesystems ([pilot plan](docs/pilot-plan.md)), the external security review ([self-review](docs/security-review.md)), and scale measurements on documented hardware ([scale](docs/research/scale.md)). Version 0.1.0 is prepared in `INFO` and [CHANGELOG.md](CHANGELOG.md) but not tagged.

## Why

Expand Down Expand Up @@ -38,6 +38,7 @@ Out of scope: any write, clear, reset, or tuning operation on a node or filesyst
## Design

- [docs/PLAN.md](docs/PLAN.md) is the full plan: architecture, upstream facts it depends on (with sources and what is still unverified), counter semantics, state model, security boundaries, performance arithmetic, testing, and risks.
- [docs/operator-guide.md](docs/operator-guide.md) covers install, the graphs and values, upgrade, backup and restore, uninstall, and troubleshooting; [docs/alerting.md](docs/alerting.md) covers Thold and Maint.
- [docs/node-setup.md](docs/node-setup.md) describes how to prepare a Lustre server and a poller for the reader.
- [docs/decisions/](docs/decisions/) holds architecture decision records for choices already made.
- [docs/REQUIREMENTS.md](docs/REQUIREMENTS.md) maps every requirement ID to its issue.
Expand Down
1 change: 1 addition & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = 1
[[annotations]]
path = [
"README.md",
"CHANGELOG.md",
"CONTRIBUTING.md",
"SECURITY.md",
"docs/**",
Expand Down
15 changes: 12 additions & 3 deletions docs/PLAN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cacti 1.2 Parallel Filesystem Plugin Plan

Status: in development, plan revision 2 (2026-11-15), after the milestone 1 documentation and source research in [docs/research](research/README.md). Revision 1 was 2026-11-14. Milestone 2 (foundation) is merged on `main`: the plugin lifecycle and PHP guard, realms and pages, the filesystem, node, and network registry, the Lustre backend and forced-command node reader, the observation cache and measurement state model, the health page, and the test harness. Milestone 3 (Lustre observation) is merged too: a Cacti device per filesystem, OST and MDT data queries, the templates, five overview graphs, and per-target graphs on demand, with the differences from this plan listed in the milestone 3 implementation notes. Milestone 4 and later are not done: Thold and Maint integration is not validated, and there is no release. Sections below describe the design; where they differ from what is merged, the milestone table shows which milestone delivers it. Statements about Lustre, GPFS, BeeGFS, RRDtool, Cacti core, Thold, and Maint describe upstream behavior and cite the source that was checked, at a pinned tag or commit where one exists. Anything that could not be verified is listed under [Assumptions to confirm](#assumptions-to-confirm) and tracked as a research issue; the design does not treat it as fact. Items that need a real Lustre, Storage Scale, or BeeGFS system, a Cacti remote collector, or accounts are marked *live*; none of those checks has run. Owner is not assigned; size estimates are in [estimates](research/estimates.md).
Status: in development, plan revision 2 (2026-11-15), after the milestone 1 documentation and source research in [docs/research](research/README.md). Revision 1 was 2026-11-14. Milestone 2 (foundation) is merged on `main`: the plugin lifecycle and PHP guard, realms and pages, the filesystem, node, and network registry, the Lustre backend and forced-command node reader, the observation cache and measurement state model, the health page, and the test harness. Milestone 3 (Lustre observation) is merged too: a Cacti device per filesystem, OST and MDT data queries, the templates, five overview graphs, and per-target graphs on demand, with the differences from this plan listed in the milestone 3 implementation notes. Milestone 4 (alerting and phase 1 release preparation) is code complete on its branch: Thold and Maint run end to end on the summary gauges, with the differences listed in the milestone 4 implementation notes; pilots, the external security review, and live scale measurements remain, and there is no release. Sections below describe the design; where they differ from what is merged, the milestone table shows which milestone delivers it. Statements about Lustre, GPFS, BeeGFS, RRDtool, Cacti core, Thold, and Maint describe upstream behavior and cite the source that was checked, at a pinned tag or commit where one exists. Anything that could not be verified is listed under [Assumptions to confirm](#assumptions-to-confirm) and tracked as a research issue; the design does not treat it as fact. Items that need a real Lustre, Storage Scale, or BeeGFS system, a Cacti remote collector, or accounts are marked *live*; none of those checks has run. Owner is not assigned; size estimates are in [estimates](research/estimates.md).

`plugin_pfs` brings parallel filesystem health and load into Cacti 1.2 as ordinary Cacti devices, data sources, and graphs: capacity and fill imbalance across targets, per-target throughput, and metadata operation rates. Lustre is the phase 1 backend. GPFS (IBM Storage Scale) and BeeGFS follow behind a backend interface.

Expand Down Expand Up @@ -246,7 +246,7 @@ Lustre stats counters are cumulative since initialization or the last clear (see
- Cumulative counters (byte sums, sample counts, operation counts) are stored raw as DERIVE with minimum 0 and a generous per-counter maximum. RRDtool computes the rate, and a decrease becomes an unknown interval; the maximum also makes an implausibly large interval unknown, which drops real traffic above it, so it is a plausibility bound and not a reset filter (measured offline in [counter-reset](research/counter-reset.md)). Thold computes its own rate and sees a negative value on a reset ([thold-counters](research/thold-counters.md)).
- The reader also detects a decrease and publishes unknown for that interval. A reset followed by a value larger than the last pre-reset value (a long outage, then heavy traffic) cannot be seen by a minimum of 0 alone.
- Capacity and inode counts are GAUGE.
- A counter line that is absent from a stats file that was read successfully means zero samples on `v2_17_0`. The source shows the same rule at `v2_15_8`, `v2_16_1`, and `v2_17_0`; the plugin applies it only after fixtures from real nodes confirm it for each matrix release (*live*). A failed read is unknown.
- A counter line that is absent from a stats file that was read successfully means zero samples on `v2_17_0`. The source shows the same rule at `v2_15_8`, `v2_16_1`, and `v2_17_0`. Decided in [ADR 0013](decisions/0013-absent-counter-lines-count-as-zero-in-sums.md): the OST sums count such a line as 0 only for an OST that is present, in service, current, and reported other values in the same read, and not on the read that cleared a counter which had counted; `md_ops` leaves an absent operation out of its member set, since an MDT has no condition flags; the target's own value stays unknown, and a missing, stale, or failed target keeps the sum unknown. Fixtures from real nodes still have to confirm the rule for each matrix release (*live*). A failed read is unknown.
- A filesystem aggregate across targets is unknown for any interval in which a contributing target is missing or reset. A partial sum would draw an outage as a throughput drop. The number of contributors is published beside the aggregate.
- The plugin never clears a counter. GPFS `reset` and Lustre stats writes affect every other consumer on that node.

Expand Down Expand Up @@ -289,7 +289,7 @@ Thold thresholds and Maint device schedules apply with no change to either plugi
Stated limits:

- **Sampling alignment.** Cacti polls on its own interval and the reader reads nodes on its own. Thold durations should be at least one poll interval.
- **Rates.** Thold can compute a rate from a DERIVE data source, with one negative sample on a reset, and an endpoint-difference rate (a lower bound) if a reset is hidden by a larger later value ([thold-counters](research/thold-counters.md)). Decided in [ADR 0012](decisions/0012-thold-rate-alerts-high-thresholds-only.md) (#8): rate alerts on DERIVE data sources are supported for high thresholds with a duration of at least two polls; low-threshold rate alerts are unsupported in phase 1, because a reset can reach Thold as a negative rate.
- **Rates.** Superseded in practice by the milestone 4 finding below: with Thold 1.8.2, a threshold on a DERIVE data source that reads `U` once crashes Thold's poller output hook. Thold can compute a rate from a DERIVE data source, with one negative sample on a reset, and an endpoint-difference rate (a lower bound) if a reset is hidden by a larger later value ([thold-counters](research/thold-counters.md)). Decided in [ADR 0012](decisions/0012-thold-rate-alerts-high-thresholds-only.md) (#8): rate alerts on DERIVE data sources are supported for high thresholds with a duration of at least two polls; low-threshold rate alerts are unsupported in phase 1, because a reset can reach Thold as a negative rate.
- **Resets.** A counter reset yields one unknown interval, which does not trigger a threshold.
- **Summary only.** Alerts see the summary and per-target gauges, not distributions.

Expand All @@ -303,6 +303,15 @@ Alternatives considered:

**Maintenance.** Device maintenance works through Maint with no change to Maint or Thold: Thold calls `plugin_maint_check_cacti_host()` directly, and the plugin uses the same guarded call. Measurements continue during maintenance; only notifications are suppressed. Maint declares `remote_collect:0`, so its hooks do not run on a remote collector; whether Thold on a collector can still load Maint's functions and apply maintenance there was not checked and is an integration check (*live*).

Milestone 4 implementation notes, where the build differs from or adds to the text above:

- **Counter thresholds are not supported with Thold 1.8.2.** Thold stores a `U` from a DERIVE data source as its previous raw value and on the next numeric value throws a PHP `TypeError` in the `poller_output` hook; Cacti then disables Thold. The plugin serves `U` for every reset and contributor change by design, so ADR 0012's supported rate alerts would disable Thold at the first reset. The end-to-end run checks a two-poll high rate threshold only before any `U` and then removes it. Thold's unreleased development branch changes this path. Whether to amend ADR 0012, report it to Thold, or add plugin-computed rate gauges is an owner decision ([alerting](alerting.md), [thold-counters](research/thold-counters.md#milestone-4-end-to-end-run)).
- **Absent counter lines in sums** count as zero only for a present, in-service OST whose other values are current in the same read ([ADR 0013](decisions/0013-absent-counter-lines-count-as-zero-in-sums.md)). The per-target series stays unknown. A read without `snapshot_time` is not complete, so nothing in it counts as absent.
- **A missing target serves `U` at once.** Milestone 3 served a missing or conflicting target's last gauge until it went stale (up to two intervals), which drew an outage as a flat line. The data query now serves `U` for any target that is not present; its index and data source stay.
- **`age` is drawn on the Fill graph.** Cacti creates in an RRD file only the values some graph item uses; `age` was not drawn, so it had no RRD value and no threshold could be made on it. The Fill graph now prints it.
- **`targets_missing` and `age` are the outage alerts.** Sums go unknown on a missing target, and in Thold 1.8.2 an unknown value is never a breach, so outages are alerted on through these two gauges.
- **Release archive.** `.gitattributes` leaves tests and CI files out of `git archive`; the archive prefix must be `pfs/` ([release](release.md)).

## Remote operation (phase 2)

When nodes are reachable only from a Cacti remote data collector, that collector runs the reader and the script server input (ADR 0004):
Expand Down
Loading
Loading