[hobbit] How to remove test ( test column ) from all hosts in hobbit

Ralph Mitchell ralphmitchell at gmail.com
Tue Oct 16 22:18:16 CEST 2007


On 10/16/07, Henrik Stoerner <henrik at hswn.dk> wrote:
> On Tue, Oct 16, 2007 at 12:56:07PM -0400, Michael A. Price wrote:
> > I found the command to remove a test from a single host.
> >
> > ~/server/bin/bb 127.0.0.1 "drop HOSTNAME ftp"
> >
> > That works great, but I have 400+ hosts, so I have to do this for each
> > host.
> >
> > I was wondering if there was a command to remove the single test from
> > all the hosts???
>
> How about
>
>    bbcmd bbhostgrep ftp | awk '{print $2}' | \
>       while read H; do bb 127.0.0.1 "drop $H ftp"; done
>
> That should do it ...

Won't that only work for hosts that still have 'ftp' in the bb-hosts
file??  Instead of bbhostgrep, how about hobbitdboard??

     ~/server/bin/bb localhost "hobbitdboard test=ftp fields=hostname"  | \
          while read H
          do
             ~/server/bin/bb localhost "drop $H ftp"
          done

Ralph Mitchell



More information about the Xymon mailing list