Add Ceph check
This commit is contained in:
parent
11e8af995c
commit
34af6145b1
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Ceph check for Check_MK
|
||||||
|
# Installed by PVC ansible
|
||||||
|
|
||||||
|
CMK_VERSION="2.1.0"
|
||||||
|
|
||||||
|
USER=client.admin
|
||||||
|
KEYRING=/etc/ceph/ceph.client.admin.keyring
|
||||||
|
|
||||||
|
if [ -n "$USER" ] && [ -n "$KEYRING" ]; then
|
||||||
|
CEPH_CMD="ceph -n $USER --keyring=$KEYRING"
|
||||||
|
echo "<<<ceph_status>>>"
|
||||||
|
$CEPH_CMD -s -f json-pretty
|
||||||
|
if OUT="$($CEPH_CMD df detail --format json)"; then
|
||||||
|
echo "<<<ceph_df_json:sep(0)>>>"
|
||||||
|
$CEPH_CMD version --format json
|
||||||
|
echo "$OUT"
|
||||||
|
else
|
||||||
|
# fallback for old versions if json output is not available
|
||||||
|
echo "<<<ceph_df>>>"
|
||||||
|
$CEPH_CMD df detail
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -638,6 +638,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
with_items:
|
with_items:
|
||||||
- backup
|
- backup
|
||||||
|
- ceph
|
||||||
- cephfsmounts
|
- cephfsmounts
|
||||||
- dpkg
|
- dpkg
|
||||||
- entropy
|
- entropy
|
||||||
|
|
Loading…
Reference in New Issue