Xymon Mailing List Archive search

Removing many reports

list Henrik Størner
Tue, 5 Sep 2006 09:26:23 +0200
Message-Id: <user-4619d3fc8d80@xymon.invalid>

On Tue, Sep 05, 2006 at 08:07:34AM +0200, Ulric Eriksson wrote:
I have figured out how to remove a single test from one host, or 
all tests from a single host. 
The command
   bb 127.0.0.1 "hobbitdboard"
is your friend, combined with a bit of scripting. E.g:
Is it possible to remove a single test from *all* hosts? 
bb 127.0.0.1 "hobbitdboard test=MYTEST fields=hostname" |
   while read H; do bb 127.0.0.1 "drop $H MYTEST"; done
Or all tests from all hosts? 
bb 127.0.0.1 "hobbitdboard test=info fields=hostname" |
   while read H; do bb 127.0.0.1 "drop $H"; done
Or all tests that are purple?
bb 127.0.0.1 "hobbitdboard color=purple fields=hostname,testname" |
while read L; do 
      HOST=`echo $L | cut -d'|' -f1`
      TEST=`echo $L | cut -d'|' -f2`
      bb 127.0.0.1 "drop $HOST $TEST"
done


Regards,
Henrik