remove interval from rrd putval

This commit is contained in:
2025-04-12 21:50:53 +02:00
committed by root
parent c9d1e57f2f
commit c07138bf1a

View File

@@ -1,14 +1,13 @@
#!/bin/bash
SPEEDTEST=/usr/bin/speedtest-cli
SPEEDTEST="/usr/bin/speedtest-cli --secure"
COLLECTION=sepia
INTERVAL=900
while :; do
SECONDS=0
SECONDS=0
RESULT=($($SPEEDTEST | grep Mbit | cut -d' ' -f 2))
TIMESTAMP=$(date +%s)
#echo "PUTVAL $COLLECTION/exec-speedtest/gauge-download interval=$INTERVAL N:${RESULT[0]}"
#echo "PUTVAL $COLLECTION/exec-speedtest/gauge-upload interval=$INTERVAL N:${RESULT[1]}"
echo "PUTVAL $COLLECTION/exec-speedtest/gauge-download ${TIMESTAMP}:${RESULT[0]}"
echo "PUTVAL $COLLECTION/exec-speedtest/gauge-upload ${TIMESTAMP}:${RESULT[1]}"
sleep $((INTERVAL-$SECONDS))