[hobbit] Need for a report
Stewart_Larsen at doh.state.fl.us
Stewart_Larsen at doh.state.fl.us
Wed May 24 16:47:17 CEST 2006
How will this handle situations where you have the same machine listed
on different subpages? Will that machine show up twice in the totals?
Or only once?
-----Original Message-----
From: Henrik Stoerner [mailto:henrik at hswn.dk]
Sent: Tuesday, May 23, 2006 4:50 PM
To: hobbit at hswn.dk
Subject: Re: [hobbit] Need for a report
On Tue, May 23, 2006 at 04:27:10PM -0400, PNIXON at ci.somerville.ma.us
wrote:
> Cleaned up the formatting and changed from grep -h red to grep -l
"^red"
>
> --
> #!/bin/sh
> BBVAR="/bb/bbvar"
>
> TOTAL=`ls $BBVAR/logs/*.conn | wc -l`
> red=`grep -l "^red" $BBVAR/logs/*.conn | wc -l`
> yellow=`grep -l "^yellow" $BBVAR/logs/*.conn | wc -l`
> clear=`grep -l "^clear" $BBVAR/logs/*.conn | wc -l`
> blue=`grep -l "^blue" $BBVAR/logs/*.conn | wc -l`
> purple=`grep -l "^purple" $BBVAR/logs/*.conn | wc -l`
>
> echo "Total Connectivity: $TOTAL
> Red Conn: $red
> Yellow Conn: $yellow
> Clear Conn: $clear
> Disabled Conn: $blue
> Purple Conn: $purple"
This works fine for a BB installation, but not for Hobbit since
Hobbit doesn't store the logfiles on disk (not in the default
configuration, at least).
So as Francesco mentioned, you should fetch the status with the
hobbitdboard command. Something like this would do it:
bb 127.0.0.1 "hobbitdboard color=red,yellow,purple,green test=conn
fields=color" | sort | uniq -c
On one of my systems this yields:
1416 green
68 purple
143 red
Sounds like what the original poster wanted.
Regards,
Henrik
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
Teach CanIt if this mail (ID 79502299) is spam:
Spam:
https://antispam.doh.ad.state.fl.us/canit/b.php?c=s&i=79502299&m=29de7a2
be3c3
Not spam:
https://antispam.doh.ad.state.fl.us/canit/b.php?c=n&i=79502299&m=29de7a2
be3c3
Forget vote:
https://antispam.doh.ad.state.fl.us/canit/b.php?c=f&i=79502299&m=29de7a2
be3c3
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
More information about the Xymon
mailing list