diff --git a/monitoring/custom-scripts/check_mk-agent/count-streams.cfg b/monitoring/custom-scripts/check_mk-agent/count-streams.cfg index 75232ec..f1cee89 100644 --- a/monitoring/custom-scripts/check_mk-agent/count-streams.cfg +++ b/monitoring/custom-scripts/check_mk-agent/count-streams.cfg @@ -1,2 +1,4 @@ # config file for count-streams.sh -STREAMERS=http://stream.openfest.org/stats \ No newline at end of file +STREAMERS=http://stream.openfest.org/stats +WARNLEVEL=3 +CRITLEVEL=6 \ No newline at end of file diff --git a/monitoring/custom-scripts/check_mk-agent/count-streams.sh b/monitoring/custom-scripts/check_mk-agent/count-streams.sh index 94ec82d..ebb6817 100644 --- a/monitoring/custom-scripts/check_mk-agent/count-streams.sh +++ b/monitoring/custom-scripts/check_mk-agent/count-streams.sh @@ -8,17 +8,17 @@ if [ -e $MK_CONFDIR/count-streams.cfg ] ; then . $MK_CONFDIR/count-streams.cfg fi +echo "<<>>" if [ ! -r $MK_CONFDIR/count-streams.xsl ] ; then _res=3 _data="UNKNOWN: Stylesheet not found" fi -echo "<<>>" for STREAMER in ${STREAMERS} ; do stream_count=`curl -sfq -m1 ${STREAMER} | xsltproc $MK_CONFDIR/count-streams.xsl -` - _warn=${1:-3} - _crit=${2:-6} + _warn=${WARNLEVEL:-3} + _crit=${CRITLEVEL:-6} if [ $stream_count -ge $_crit ] ; then _data="OK - stream count $stream_count"