Merge pull request #949 from szeestraten/patch-1

Fix metric name in directory size text collector example
This commit is contained in:
Ben Kochie 2018-05-19 23:53:32 +02:00 committed by GitHub
commit 04d69158b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@
# sed pattern taken from https://www.robustperception.io/monitoring-directory-sizes-with-the-textfile-collector/
#
# Author: Antoine Beaupré <anarcat@debian.org>
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'