Xymon Mailing List Archive search

client/ext yum update notifier extension script

list Christoph Berg
Wed, 3 Jun 2009 11:18:12 +0200
Message-Id: <user-65ffaf6c8db8@xymon.invalid>

Re: netz-haut - stephan seitz 2009-06-03 <user-f7d6d33ad5ca@xymon.invalid>
As we're going to setup some new Machines with CentOS, I'ld like to ask if someone already did a similar
extension script for yum/rpm?
Here's an ugly one:

#!/bin/sh

COLOR='yellow'
# strip CR
MACHINE=`echo $MACHINE`

yum check-update > $BBTMP/yum.out 2>&1
EXIT="$?"

[ "$EXIT" = "0" ] && COLOR='green'
egrep -q -i '^(Error|Cannot)' $BBTMP/yum.out && COLOR="red"

( echo status $MACHINE.yum $COLOR `date`
  cat $BBTMP/yum.out ) | $BB $BBDISP @

rm $BBTMP/yum.out


Christoph
-- 
user-92157dbc91bf@xymon.invalid | http://www.df7cb.de/