diff --git a/checkmk/custom-files/local/gluster b/checkmk/custom-files/local/gluster index bbb4b85b58e55babb9777e4a7db9f41c70a2bfa7..a70ffc65834b177adbdae779ce51b3aac6773a16 100644 --- a/checkmk/custom-files/local/gluster +++ b/checkmk/custom-files/local/gluster @@ -24,13 +24,19 @@ # # We currently only utilize the Online: Y information. +hostname=$(hostname) + # iterate over all available volumns for volume in $(gluster volume list) do # find all bricks for this volume for brick in $(gluster volume info $volume | grep -E '^Brick[0-9]: ' | sed -e 's/Brick[0-9]: //g') do - # grab the full status of this brick + # skip if this is not your own brick! + if [[ "$brick" != *"$hostname"* ]]; then + continue + fi + # grab the full status of this brick brick_status=$(gluster volume status $volume $brick detail) online=$(echo "$brick_status" | grep -E '^Online' | cut -d ':' -f2 | tr -d '[:space:]') case "$online" in