AP-role metrics: client telemetry replaces dead STA/campground metrics
- 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:
+7
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user