add Prometheus metrics endpoint and push script
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:
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Push skyweave metrics to Prometheus pushgateway every 30 seconds.
|
||||
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
|
||||
sleep 30
|
||||
done
|
||||
Reference in New Issue
Block a user