[hobbit] client/ext yum update notifier extension script

Christoph Berg cb at df7cb.de
Wed Jun 3 11:18:12 CEST 2009


Re: netz-haut - stephan seitz 2009-06-03 <6B73AB901767CA49B818C7A071E03FAC0CF0CA at exchange.nh.local>
> 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
-- 
cb at df7cb.de | http://www.df7cb.de/



More information about the Xymon mailing list