Add ceph osd monitoring.

This commit is contained in:
Jeremy Gardais 2015-08-29 09:23:41 +02:00
parent 07664430de
commit fede5d8b50
1 changed files with 22 additions and 14 deletions

View File

@ -91,7 +91,7 @@ if [ $(which mysqld) ]; then
MSG=$(service_info "3306" "${MSG}") MSG=$(service_info "3306" "${MSG}")
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF MYSQLD ### FI MYSQLD
### IF SLAPD ### IF SLAPD
if [ $(which slapd) ]; then if [ $(which slapd) ]; then
@ -99,7 +99,7 @@ if [ $(which slapd) ]; then
MSG=$(service_info "389 636" "${MSG}") MSG=$(service_info "389 636" "${MSG}")
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF SLAPD ### FI SLAPD
### IF ZFS ### IF ZFS
if [ $(which zfs) ]; then if [ $(which zfs) ]; then
@ -109,8 +109,9 @@ fi
### FI ZFS ### FI ZFS
### IF Ceph Monitor ### IF Ceph Monitor
## ceph-mon is installed with the 'ceph' package #if [ $(which ceph-mon) ]; then
# so we can't just check if `ceph-mon` is available on a system #ceph-mon is installed with the 'ceph' package
#so we can't just check if `ceph-mon` is available on a system
if (grep "mon_initial_members.*$(hostname)" /etc/ceph/*.conf > /dev/null); then if (grep "mon_initial_members.*$(hostname)" /etc/ceph/*.conf > /dev/null); then
MSG=$(process_info "ceph-mon" '') MSG=$(process_info "ceph-mon" '')
MSG=$(service_info "6789" "${MSG}") MSG=$(service_info "6789" "${MSG}")
@ -118,6 +119,13 @@ if (grep "mon_initial_members.*$(hostname)" /etc/ceph/*.conf > /dev/null); then
fi fi
### FI Ceph Monitor ### FI Ceph Monitor
### IF Ceph OSD
if (ceph osd tree | grep "host $(hostname)" > /dev/null 2> /dev/null); then
MSG=$(process_info "ceph-osd" '')
MSG=$(service_info "6800 6801 6802" "${MSG}")
printf '%b' "\n${MSG}"
fi
### FI Ceph OSD
### IF PUPPETMASTER ### IF PUPPETMASTER
if [ $(which puppetmaster) ]; then if [ $(which puppetmaster) ]; then
@ -125,7 +133,7 @@ if [ $(which puppetmaster) ]; then
MSG=$(service_info "8140" "${MSG}") MSG=$(service_info "8140" "${MSG}")
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF SLAPD ### IF PUPPETMASTER
### IF NFS Server ### IF NFS Server
if [ $(which nfsd) ]; then if [ $(which nfsd) ]; then
@ -133,7 +141,7 @@ if [ $(which nfsd) ]; then
MSG=$(service_info "111 2049" "${MSG}") MSG=$(service_info "111 2049" "${MSG}")
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF SLAPD ### FI NFS Server
### IF TFTPD ### IF TFTPD
if [ $(which in.tftpd) ]; then if [ $(which in.tftpd) ]; then
@ -165,21 +173,21 @@ if [ $(which sshd) ]; then
MSG=$(service_info "22" "${MSG}") MSG=$(service_info "22" "${MSG}")
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### FI SSH ### FI SSHD
### IF DHCPD ### IF DHCPD
if [ $(which dhcpd) ]; then if [ $(which dhcpd) ]; then
MSG=$(process_info "dhcpd" '') MSG=$(process_info "dhcpd" '')
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF DHCPD ### FI DHCPD
### IF FAIL2BAN ### IF FAIL2BAN
if [ $(which fail2ban-server) ]; then if [ $(which fail2ban-server) ]; then
MSG=$(process_info "fail2ban" '') MSG=$(process_info "fail2ban" '')
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF FAIL2BAN ### FI FAIL2BAN
### IF ETHERPAD ### IF ETHERPAD
if [ $(which etherpad) ]; then if [ $(which etherpad) ]; then
@ -187,7 +195,7 @@ if [ $(which etherpad) ]; then
MSG=$(service_info "9001" "${MSG}") MSG=$(service_info "9001" "${MSG}")
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF ETHERPAD ### FI ETHERPAD
### IF ETHERCALC ### IF ETHERCALC
if [ $(which ethercalc) ]; then if [ $(which ethercalc) ]; then
@ -195,7 +203,7 @@ if [ $(which ethercalc) ]; then
MSG=$(service_info "8000" "${MSG}") MSG=$(service_info "8000" "${MSG}")
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF ETHERCALC ### FI ETHERCALC
### IF GITLAB ### IF GITLAB
if [ $(which gitlab-ctl) ]; then if [ $(which gitlab-ctl) ]; then
@ -205,7 +213,7 @@ if [ $(which gitlab-ctl) ]; then
MSG=$(process_info "gitlab" '') MSG=$(process_info "gitlab" '')
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF GITLAB ### FI GITLAB
### IF XYMONSERVER ### IF XYMONSERVER
if [ $(which xymond) ]; then if [ $(which xymond) ]; then
@ -213,14 +221,14 @@ if [ $(which xymond) ]; then
MSG=$(service_info "1984" "${MSG}") MSG=$(service_info "1984" "${MSG}")
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF XYMONSERVER ### FI XYMONSERVER
### IF XYMONCLIENT ### IF XYMONCLIENT
if [ $(which xymon) ]; then if [ $(which xymon) ]; then
MSG=$(process_info "xymonlaunch" '') MSG=$(process_info "xymonlaunch" '')
printf '%b' "\n${MSG}" printf '%b' "\n${MSG}"
fi fi
### IF XYMONCLIENT ### FI XYMONCLIENT
## Service need a warning if running ## Service need a warning if running