to get a the count of a color you can use the bb command with hobbitdboard message like this one:
bb localhost "hobbitdboard test=conn color=red fields=hostname" |wc -l
You can change "conn" with the test you want to count and "red" with the color ...
Da: user-c102b8958c7a@xymon.invalid [mailto:user-c102b8958c7a@xymon.invalid]
Inviato: mar 23/05/2006 21.05
A: user-ae9b8668bcde@xymon.invalid
Oggetto: RE: [hobbit] Need for a report
You'll need to HTML it, but here's a script for you. Change BBVAR to the
appropriate value.
--
#!/bin/sh
BBVAR="/bb/bbvar"
TOTAL=`ls $BBVAR/logs/*.conn | wc -l`
red=`grep -h red $BBVAR/logs/*.conn | wc -l`
yellow=`grep -h yellow $BBVAR/logs/*.conn | wc -l`
clear=`grep -h clear $BBVAR/logs/*.conn | wc -l`
blue=`grep -h blue $BBVAR/logs/*.conn | wc -l`
purple=`grep -h 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"
-----Original Message-----
From: user-6f5382941e41@xymon.invalid [mailto:user-6f5382941e41@xymon.invalid]
Sent: Tuesday, May 23, 2006 2:50 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Need for a report
I have what I think is a simple request, and I'm wondering the best way to
go about it.
Basically, I need to be able to run a report(in html) that says "I have to
run 1000 conn tests. Of those, 11 is red, 9 are yellow, 0 are purple, 990
are green."
Additionally, I will need to be able to add additional tests to this, but
the immediate need is for connectivity tests.
Is there a way to get this information easily, or will I need to collect and
parse the historical data to get this? The bbgen test already gives me
overall purple tests. Is there an easy way to extend those statistics?
--
Stewart Larsen, CISSP
Security Administrator, SORT Team Coordinator Florida Department of Health
Division of Information Technology HIRM, Mail Bin B05, Room 225X
4052 Bald Cypress Way,
Tallahassee, FL XXXXX-XXXX
(XXX) XXX-XXXX x 3358
If you think technology can solve your security problems, then you don't
understand the problems and you don't understand the technology.
-- Bruce Schneier
Please note: Florida has a very broad public records law. Most written
communications to or from state officials regarding state business are
public records available to the public and media upon request. Your e-mail
communications may therefore be subject to public disclosure.