Description
The ppp parser already emits a closed ppp.event vocabulary (link_up, link_down, session_established, session_closed, session_failed, reconnecting, auth_success and others), but ppp is in nonDerivedPrograms, so no metric exists. That was deferred because Link, LCP and IPCP each report one physical flap and a naive counter triple-counts. Count each physical edge once per WAN interface, and add a ppp_last_link_up_timestamp_seconds{interface} gauge modelled on the dhcp_client lease gauges. Purpose: correlate client connection resets and loss with WAN reconnects, and allow an alert on PPPoE flaps.
Acceptance Criteria
- #1 One physical PPPoE flap increments exactly one link-down and one link-up edge (fixture test from captured mpd5 lines)
- #2 A last-link-up timestamp gauge per WAN interface
- #3 Metrics reference regenerated, plus a Grafana alert or panel for reconnects
Definition of Done
- #1 just check
- #2 just gen (if any generated artifact changed) and the diff committed
Implementation Plan
Inspect source contracts and live evidence where required; implement bounded telemetry with fixtures, regenerate shared artifacts, review and run just check before landing.
Implementation Notes
Implemented bounded link counters and last-up timestamp using only mpd bundle IFACE Up/Down events, excluding Link/LCP/IPCP and inet/inet6 rc-script copies. Captured receiver fixture reproduced zero observations at base and exactly one down/up on candidate; collector snapshots preserve timestamp across scrapes. Added WAN dashboard edge rate and time-since-up panels.
Final Summary
Shipped IFACE-only PPPoE edge counters and last-up gauge, reconnect panels and generated reference. Captured receiver flap proves exactly one down/up despite Link/LCP/IPCP and rc-script copies; store snapshots and caps tested. just gen and just check passed; CodeRabbit wording finding fixed.