make collectd write to timescaledb and other fixes

This commit is contained in:
2025-01-31 09:12:59 +01:00
parent 45bc33ac23
commit 60fd60061d
4 changed files with 18 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
SPEEDTEST=/usr/bin/speedtest-cli
SPEEDTEST="/usr/bin/speedtest-cli --secure"
COLLECTION=shuttle
INTERVAL=900
@@ -8,8 +8,6 @@ while :; do
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))