Need for a report
list Stewart Larsen
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.
list Pnixon
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.
list Francesco Duranti
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.
list Pnixon
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"
list Henrik Størner
▸
On Tue, May 23, 2006 at 04:27:10PM -0400, user-c102b8958c7a@xymon.invalid 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
list Pnixon
Doh! I didn't realize I was doing things abnormally :) My apologizes for the spam then. --Pat
▸
-----Original Message-----
From: user-ce4a2c883f75@xymon.invalid [mailto:user-ce4a2c883f75@xymon.invalid] Sent: Tuesday, May 23, 2006 4:50 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Need for a report
On Tue, May 23, 2006 at 04:27:10PM -0400, user-c102b8958c7a@xymon.invalid 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
list Stewart Larsen
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:user-ce4a2c883f75@xymon.invalid]
Sent: Tuesday, May 23, 2006 4:50 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Need for a report
On Tue, May 23, 2006 at 04:27:10PM -0400, user-c102b8958c7a@xymon.invalid
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
-- 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
list Henrik Størner
▸
On Wed, May 24, 2006 at 10:47:17AM -0400, user-6f5382941e41@xymon.invalid wrote:
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?
Hobbit only counts each host once. The fact that it shows up in multiple places on the webpages is irrelevant. Henrik