diff --git a/text_collector_examples/directory-size.sh b/text_collector_examples/directory-size.sh index 2c15402f..4aab71d9 100755 --- a/text_collector_examples/directory-size.sh +++ b/text_collector_examples/directory-size.sh @@ -9,7 +9,7 @@ # sed pattern taken from https://www.robustperception.io/monitoring-directory-sizes-with-the-textfile-collector/ # # Author: Antoine Beaupré -echo "# HELP anarcat_dir_space_bytes Disk space used by some directories" -echo "# TYPE anarcat_dir_space_bytes gauge" +echo "# HELP node_directory_size_bytes Disk space used by some directories" +echo "# TYPE node_directory_size_bytes gauge" du --block-size=1 --summarize "$@" \ | sed -ne 's/\\/\\\\/;s/"/\\"/g;s/^\([0-9]\+\)\t\(.*\)$/node_directory_size_bytes{directory="\2"} \1/p'