diff options
author | Britney Fransen <brfransen@gmail.com> | 2015-05-27 15:31:54 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2015-05-27 15:31:54 (GMT) |
commit | 38079a3274f3ddce0a43a0d232784acb3a8f8cc7 (patch) | |
tree | 6ad5f4f5e27573e2f9232384e41f786056f4d133 /abs/core/xymon/hobbit_notify.sh | |
parent | 4589b4981d9206d3503515c27e747d1b6ff9f356 (diff) | |
download | linhes_pkgbuild-38079a3274f3ddce0a43a0d232784acb3a8f8cc7.zip linhes_pkgbuild-38079a3274f3ddce0a43a0d232784acb3a8f8cc7.tar.gz linhes_pkgbuild-38079a3274f3ddce0a43a0d232784acb3a8f8cc7.tar.bz2 |
xymon: only show OSD alert for full system partitions
Diffstat (limited to 'abs/core/xymon/hobbit_notify.sh')
-rw-r--r-- | abs/core/xymon/hobbit_notify.sh | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/abs/core/xymon/hobbit_notify.sh b/abs/core/xymon/hobbit_notify.sh index 26b789f..9028fb0 100644 --- a/abs/core/xymon/hobbit_notify.sh +++ b/abs/core/xymon/hobbit_notify.sh @@ -40,28 +40,37 @@ function msg_func_out() { } function msg_local_out() { - /usr/LH/bin/msg_client.py --msg "${1}" - - } +} case x$BBSVCNAME in xdisk) - case $BBCOLORLEVEL in + case $BBCOLORLEVEL in red ) - msg_func_out "$BBHOSTNAME disk is at 95% full or greater|alert" + if [[ $BBALPHAMSG == *"&red / ("* ]] + then + msg_func_out "The OS (/) partition on $BBHOSTNAME is over 99% full|alert" + fi + if [[ $BBALPHAMSG == *"&red /home ("* ]] + then + msg_func_out "The home (/home) partition on $BBHOSTNAME is over 99% full|alert" + fi + if [[ $BBALPHAMSG == *"&red /data/srv/mysql ("* ]] + then + msg_func_out "The mysql (/data/srv/mysql) partition on $BBHOSTNAME is over 99% full|alert" + fi ;; yellow ) - msg_func_out "$BBHOSTNAME disk is almost full" + msg_func_out "A disk on $BBHOSTNAME is almost full" ;; esac ;; - + xfunc) - if [ "x$hostname" = "x$BBHOSTNAME" ] + if [ "x$hostname" = "x$BBHOSTNAME" ] then msg_local_out "System can not communicate with itself (func) |alert" else @@ -74,6 +83,3 @@ case x$BBSVCNAME in msg_func_out "Condition $BBCOLORLEVEL $BBSVCNAME on $BBHOSTNAME\nSee the system health webpage.|alert" ;; esac - - - |