summaryrefslogtreecommitdiff
path: root/accel-cmd
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2026-08-02 04:13:11 +0300
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-08-02 04:51:09 +0300
commitedd9f9ce6fc0f99e751fde20b0bb55bbd6b3a2f9 (patch)
tree3f905c80bdf306ec08c1b93484f7b7e3764e4bde /accel-cmd
parent93c6a21673f693640ec8004b063a3471f784f8fa (diff)
downloadaccel-ppp-edd9f9ce6fc0f99e751fde20b0bb55bbd6b3a2f9.tar.gz
accel-ppp-edd9f9ce6fc0f99e751fde20b0bb55bbd6b3a2f9.zip
metrics: expose session details in JSON output
Add an opt-in sessions setting for the JSON metrics renderer. Include session identity, addressing, protocol state, interface context, uptime, and traffic counters while keeping Prometheus output aggregate-only. The session list is walked with ses_lock held, so report the accounting counters the session last sampled rather than calling ap_session_read_stats(): that issues a synchronous netlink round trip per session, which would stall session setup and teardown for the duration of a scrape, it writes back into the session while only the read lock is held, and it needs the thread local net of the session's namespace, which the metrics context does not have. Counter freshness therefore follows accounting, which the documentation spells out. Escape malformed UTF-8 in peer supplied strings so a single bad username cannot make the whole document undecodable, and reserve room for the response header in front of the rendered body so a body that can be megabytes is not copied a second time. Document the privacy-sensitive option in both accel-ppp.conf and the man page, and cover the empty session list, the aggregate-only Prometheus output and the response framing in the metrics integration test.
Diffstat (limited to 'accel-cmd')
0 files changed, 0 insertions, 0 deletions