AP-role metrics: client telemetry replaces dead STA/campground metrics
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

- metrics.lua: drop vif-sta0 station + campground-gateway sections (roof
  is a dumb AP since 2026-06-07); add skyweave_ap_* families — client
  count, per-client signal/SNR/bitrates/idle/association-time from
  iwinfo assoclist, noise floor, txpower, channel. Ping targets now
  chateau_gateway + talos_via_tunnel + internet (DNS).
- skyweave-push.sh: PUT instead of POST so departed-client series and
  retired families don't linger on the pushgateway; skip push when the
  local metrics fetch fails.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wes
2026-06-09 19:40:11 -04:00
co-authored by Claude Fable 5
parent d3d672c4f1
commit 6d0a8227a4
2 changed files with 138 additions and 77 deletions
+7 -1
View File
@@ -1,9 +1,15 @@
#!/bin/sh
# Push skyweave metrics to Prometheus pushgateway every 30 seconds.
# PUT (not POST) so the whole group is replaced each cycle — per-client
# series for departed stations don't linger. Skips the push if the local
# metrics fetch fails, so a CGI hiccup never blanks the group.
PUSHGW="http://192.168.88.44:9091/metrics/job/rvlink/instance/rvlink"
METRICS_URL="http://127.0.0.1:42069/cgi-bin/skyweave.lua/metrics"
while true; do
curl -sf "$METRICS_URL" | curl -sf --data-binary @- "$PUSHGW" >/dev/null 2>&1
BODY=$(curl -sf "$METRICS_URL")
if [ -n "$BODY" ]; then
printf '%s\n' "$BODY" | curl -sf -X PUT --data-binary @- "$PUSHGW" >/dev/null 2>&1
fi
sleep 30
done