From c07138bf1a1a26e50fc2b2eeec35564c0491e86a Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Sat, 12 Apr 2025 21:50:53 +0200 Subject: [PATCH] remove interval from rrd putval --- collectd/usr/local/bin/speedtest-data | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/collectd/usr/local/bin/speedtest-data b/collectd/usr/local/bin/speedtest-data index 2404825..a3e23c6 100755 --- a/collectd/usr/local/bin/speedtest-data +++ b/collectd/usr/local/bin/speedtest-data @@ -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))