add Prometheus metrics endpoint and push script
Skyweave Test, Lint, and Deploy Ritual / Test and Lint Code (push) Has been cancelled
Skyweave Test, Lint, and Deploy Ritual / Deploy to Roof Unit (push) Has been cancelled

New /metrics endpoint exposes WiFi signal, bitrate, gateway,
system uptime/load/memory, and ping reachability in Prometheus
exposition format. skyweave-push.sh loops every 30s pushing
metrics to the pushgateway on deltrian.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
wes
2026-04-09 07:35:51 -04:00
co-authored by Claude Opus 4.6
parent 98e04a7b31
commit d3d672c4f1
5 changed files with 258 additions and 1 deletions
+2
View File
@@ -45,6 +45,7 @@ local success, load_result = pcall(function()
local network_handlers = require("skyweave.handlers.network")
local system_handlers = require("skyweave.handlers.system")
local wifi_handlers = require("skyweave.handlers.wifi")
local metrics_handlers = require("skyweave.handlers.metrics")
local router = Router:new()
@@ -54,6 +55,7 @@ local success, load_result = pcall(function()
router:add_route("GET", "/SOS", network_handlers.set_connect_wifi_sos)
router:add_route("GET", "/wifi_scan", wifi_handlers.get_wifi_scan)
router:add_route("GET", "/system_log_parsed", system_handlers.get_system_log_parsed)
router:add_route("GET", "/metrics", metrics_handlers.get_metrics)
local request = request_context_builder.create_request_context()