From 38079a3274f3ddce0a43a0d232784acb3a8f8cc7 Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Wed, 27 May 2015 15:31:54 +0000 Subject: xymon: only show OSD alert for full system partitions --- abs/core/xymon/PKGBUILD | 4 ++-- abs/core/xymon/hobbit_notify.sh | 28 +++++++++++++++++----------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD index b8e6355..932497b 100755 --- a/abs/core/xymon/PKGBUILD +++ b/abs/core/xymon/PKGBUILD @@ -1,7 +1,7 @@ pkgbase=xymon pkgname=('xymonserver' 'xymonclient') pkgver=4.3.17 -pkgrel=17 +pkgrel=18 pkgdesc="Xymon is a system for monitoring of hosts and networks" license="GPL" arch=('i686' 'x86_64') @@ -176,7 +176,7 @@ md5sums=('d8d119a777e7b7204d1292fb27314312' '0c808fa12672289f86b0651545381308' '0469d775db9fdd18ea95dd41937ada82' '0757294eec13771f8e63da23cf066796' - '270e13da6cbc9d49079d994edaa71e64' + '3126ef4e5e82f096cf5ecb4dce4e2306' '22d4c9065fd959efe82f121dcb511305' '9af2ad60ac4c3cb653754618f603e311' '313b11e7a22c3c08fb2afaadbfb46d87' 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 - - - -- cgit v0.12