summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2026-05-14 01:01:27 +0300
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-05-14 10:04:56 +0300
commitd200bdcb39f754ac360b78bf408a3c66f50e8a8c (patch)
treeb133d76ad09a5bd973f5b1486430999eb6a01ce4 /tests
parentd5a0c7da380ff2efc359b939ac9abd5ffc10df69 (diff)
downloadaccel-ppp-d200bdcb39f754ac360b78bf408a3c66f50e8a8c.tar.gz
accel-ppp-d200bdcb39f754ac360b78bf408a3c66f50e8a8c.zip
metrics: render Prometheus exposition for /metrics
Fill in the body that GET /metrics returns when format=prometheus. The exposed series mirror what `show stat` prints over the CLI today: * accel_ppp_build_info{version="..."} 1 * accel_ppp_uptime_seconds * accel_ppp_cpu_percent * accel_ppp_memory_{rss,virt}_bytes (read from /proc/<pid>/statm) * accel_ppp_core_mempool_{allocated,available}_bytes * accel_ppp_core_threads{,_active} * accel_ppp_core_contexts{,_sleeping,_pending} * accel_ppp_core_md_handlers{,_pending} * accel_ppp_core_timers{,_pending} * accel_ppp_sessions{state="starting|active|finishing"} * accel_ppp_protocol_sessions{protocol=...,state=...} for every protocol module that is currently loaded — pppoe, l2tp, pptp, sstp, ipoe — gated by triton_module_loaded() so we never call a stat helper from a module that wasn't loaded. A small growing strbuf helper coalesces the rendering into a single buffer that is passed to send_response() in one shot. Per-protocol forward declarations rely on the existing RTLD_LAZY|RTLD_GLOBAL load behaviour used by net-snmp, so the metrics .so does not need to link against pppoe.so, l2tp.so, etc. json format remains a stubbed `{}` body — the next commit replaces that with a real renderer. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions