Some useful bash scripts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5 lines
231 B

echo "# HELP node_directory_size_bytes Disk space used by some directories"
echo "# TYPE node_directory_size_bytes gauge"
du -bsx $1 | sed "s/\([0-9]*\).*\/\(.*\)/node_directory_size_bytes{name=\"\2\",key=\"$2\"} \1/"