FIX: Update telegraf influxdbsize.sh to collect influxdb size from influxdb_size.log #7468

This commit is contained in:
Doug Burks
2022-03-18 13:15:43 -04:00
committed by GitHub
parent f7dc5588ae
commit eda7a8d7ea

View File

@@ -18,9 +18,12 @@
# if this script isn't already running
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
INFLUXSIZE=$(du -s -k /host/nsm/influxdb | awk {'print $1'})
echo "influxsize kbytes=$INFLUXSIZE"
INFLUXLOG=/var/log/telegraf/influxdb_size.log
if [ -f "$INFLUXLOG" ]; then
INFLUXSTATUS=$(cat $INFLUXLOG)
echo "influxsize kbytes=$INFLUXSTATUS"
fi
fi
exit 0