Skip to content

[BF] Show explicit empty states for missing sFlow P2P graphs - #1183

Open
repstein2 wants to merge 2 commits into
inex:mainfrom
repstein2:fix/sflow-p2p-no-measurable-traffic
Open

repstein2 wants to merge 2 commits into
inex:mainfrom
repstein2:fix/sflow-p2p-no-measurable-traffic

Conversation

@repstein2

@repstein2 repstein2 commented Nov 4, 2026 •

Copy link
Copy Markdown

When a single-member-to-member sFlow RRD does not exist yet, the backend returns an empty PNG response and browsers show a broken-image icon. This is common for newly connected or low-volume members. Observed on 7.4.1.

This fix distinguishes absent local RRDs and remote HTTP 404s from other file or transport failures. Single-P2P PNG requests render “No Measurable Traffic” for missing data, and “Graph Temporarily Unavailable” for other FileError failures, which also log an operational warning. The subtitle is “No sampled traffic data is available between these members.” Existing graphs, including valid zero/flat graphs, retain normal rendering. No synthetic counters or RRDs are created.

PNG assets are served through the existing graph endpoint, authorization checks, and cache. Multi-P2P rendering and JSON/log/RRD exports keep their existing behavior. PHP 8.4 response-header helpers distinguish HTTP errors from transport failures.

Validation:

  • PHP 8.4 syntax and 16 standalone regression checks pass locally and on a 7.4.1 host with the real RRD extension installed.
  • Staged and installed tests as the web-service user verified missing-data PNGs for two absent RRDs and normal PNGs for two existing RRDs.
  • The signed-in portal rendered the missing-data placeholder for day/week/month/year.
  • The upstream CI PHPUnit suites and Psalm passed in the contributor fork: https://github.com/repstein2/IXP-Manager/actions/runs/42424264945. Dusk was not run. HTTP error tests inject fetch results; real-data checks exercise successful retrieval and HTTP 404.

A missing file is not proof of a healthy collector: a bad root URL or absent mount can also leave files missing. Independent collector/root monitoring is still necessary. Error placeholders are valid images, so transport-status-only monitoring will not detect the rendered operational error.

Deployed as a pilot at Community IX NoVA. Ready for maintainer review; happy to adapt the presentation or test organization. The contributor emailed their signed CLA and public key to operations@inex.ie on November 7, 2026; INEX acknowledgement is pending.

  • Upstream PHPUnit suites
  • Psalm using the repository baseline
  • Existing privilege/resource checks retained
  • No new mutation endpoints or template interpolation

@repstein2
repstein2 marked this pull request as ready for review November 7, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant