Add debian common role
This commit is contained in:
15
common-debian/files/usr/lib/check_mk_agent/plugins/cephfsmounts
Executable file
15
common-debian/files/usr/lib/check_mk_agent/plugins/cephfsmounts
Executable file
@ -0,0 +1,15 @@
|
||||
echo '<<<cephfsmounts>>>'
|
||||
sed -n '/ ceph\? /s/[^ ]* \([^ ]*\) .*/\1/p' < /proc/mounts |
|
||||
sed 's/\\040/ /g' |
|
||||
while read MP
|
||||
do
|
||||
if [ ! -r $MP ]; then
|
||||
echo "$MP Permission denied"
|
||||
elif [ $STAT_VERSION != $STAT_BROKE ]; then
|
||||
waitmax -s 9 2 stat -f -c "$MP ok %b %f %a %s" "$MP" || \
|
||||
echo "$MP hanging 0 0 0 0"
|
||||
else
|
||||
waitmax -s 9 2 stat -f -c "$MP ok %b %f %a %s" "$MP" && \
|
||||
printf '\n'|| echo "$MP hanging 0 0 0 0"
|
||||
fi
|
||||
done
|
Reference in New Issue
Block a user