add storage tracker script
This commit is contained in:
parent
d76c5a9131
commit
899aac977f
@ -4,7 +4,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
- "influx-only"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
|
12
storage-tracker.sh
Normal file
12
storage-tracker.sh
Normal file
@ -0,0 +1,12 @@
|
||||
usage_engine=$(du -s /home/tracker/influx/db/engine/data/setme/ | cut -f1)
|
||||
usage_wal=$(du -s /home/tracker/influx/db/engine/wal/setme/ | cut -f1)
|
||||
|
||||
# Calculate the sum of usage_engine and usage_wal
|
||||
total_usage=$((usage_engine + usage_wal))
|
||||
|
||||
docker exec influxdb influx write \
|
||||
--org homelab \
|
||||
--bucket influx_metrics \
|
||||
--token setme \
|
||||
--precision s \
|
||||
"storage_usage,db=mc-tracker value=$total_usage"
|
Loading…
x
Reference in New Issue
Block a user