* (#4) Add a basic monitoring for Ceph health (default username).

This commit is contained in:
gardouille 2015-08-27 15:03:41 +02:00
parent f3e93e796f
commit c604db82cb
2 changed files with 17 additions and 2 deletions

View File

@ -11,6 +11,7 @@
* (#3) Correct ((LINE++)) -> BASH with LINE=$((LINE+1)) -> SH
* (#4) Add monitoring for Ceph Monitor (process and port).
* (#4) Add monitoring for Ceph OSD (process and few ports).
* (#4) Add a basic monitoring for Ceph health (default username).
---------------------------------------

View File

@ -20,7 +20,7 @@ WHITEB='\033[1;37m'
RESET='\033[0m'
printf '%b' "${MAGENTA}++++++++++++++++++++: ${WHITE}Disk Usage${MAGENTA} :+++++++++++++++++++++${RESET}"
printf '%b' "${MAGENTA}++++++++++++++++++++: ${WHITE}Disk Usage${RESET} ${MAGENTA}:+++++++++++++++++++++${RESET}"
# Root partition
# Replace by rootfs in few kernel version
DISK_USAGE=$(df | grep -m1 "/$" | awk '{print $5}')
@ -37,7 +37,7 @@ done
### IF ZFS
if [ $(which zpool) ]; then
printf '%b' "\n${MAGENTA}+++++++++++++++++++ ${WHITEB}ZFS${RESET} ${WHITE}Partitions${MAGENTA} :++++++++++++++++++${RESET}"
printf '%b' "\n${MAGENTA}+++++++++++++++++++ ${WHITEB}ZFS${RESET} ${WHITE}Partitions${RESET} ${MAGENTA}:++++++++++++++++++${RESET}"
NUMBER_PART=$(df -T | grep zfs | wc -l)
LINE=1
@ -51,6 +51,20 @@ if [ $(which zpool) ]; then
fi
### FI ZFS
### IF CEPH
if [ -f /etc/ceph/ceph.conf ]; then
printf '%b' "\n${MAGENTA}++++++++++++++++++++++++ ${WHITEB}Ceph${RESET} ${MAGENTA}:++++++++++++++++++++++++${RESET}"
HEALTH=$(ceph health)
if [ $? ]; then
printf '%b' "\n${MAGENTA}+ ${GREEN}${HEALTH}"
else
printf '%b' "\n${MAGENTA}+ ${REDB}${HEALTH}"
fi
fi
### FI CEPH
printf '%b' "${RESET}\n"