Xymon Mailing List Archive search

Wish for next Hobbit Version

6 messages in this thread

list Stefan Freisler · Thu, 4 Jan 2007 15:00:16 +0100 ·
Hi,
i'm writing some admin Scripts (you can see it on this Maillinglist) and 
have 
some problems to analyse hobbit data to use them in this scripts.

To check for Hosts and Services i use this command
 ~/bin/bb 127.0.0.1 "hobbitdxboard"
(very good work)
but can you expand this to filter some thing
 ~/bin/bb 127.0.0.1 "hobbitdxboard server.domain.org"
so that only the data for this host will shown?

And can you include something like that to get informations what RRD Files 
are available?
 ~/bin/bb 127.0.0.1 "hobbitrrdxboard"
and
 ~/bin/bb 127.0.0.1 "hobbitrrdxboard  server.domain.org"

thx a lot
Stefan
list Rich Smrcina · Thu, 04 Jan 2007 08:22:12 -0600 ·
I've never used hobbitdxboard, but could you pipe it through grep?
quoted from Stefan Freisler

user-75055581652a@xymon.invalid wrote:
Hi,
i'm writing some admin Scripts (you can see it on this Maillinglist) and 
have
some problems to analyse hobbit data to use them in this scripts.

To check for Hosts and Services i use this command
 ~/bin/bb 127.0.0.1 "hobbitdxboard"
(very good work)
but can you expand this to filter some thing
 ~/bin/bb 127.0.0.1 "hobbitdxboard server.domain.org"
so that only the data for this host will shown?

And can you include something like that to get informations what RRD 
Files are available?
 ~/bin/bb 127.0.0.1 "hobbitrrdxboard"
and
 ~/bin/bb 127.0.0.1 "hobbitrrdxboard  server.domain.org"

thx a lot
Stefan
-- 

Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007
list Stefan Freisler · Thu, 4 Jan 2007 15:31:40 +0100 ·
yes of cause but when you only use grep hobbitdboard is better i think. In my scripts i parse the XML file with some commands

e.g.
HOSTS=`$BBHOME/bin/bb 127.0.0.1 "hobbitdxboard"| $TR -d '\n'| sed 's#\(.*\)<StatusBoard>\(.*\)</StatusBoard>\(.*\)#\2#'|$SED 's#</ServerStatus>#\x0A#g'|$SED 's#\(.*\)<ServerName>\(.*\)</ServerName>\(.*\)#\2#'|$SORT -u`

with this you get all hostnames only once and sorted.

If you use it on console you must change the $SED etc to sed or something else.

by
Stefan
list Rich Smrcina · Thu, 04 Jan 2007 08:37:30 -0600 ·
OK, I wasn't aware it came out as XML.
quoted from Stefan Freisler

user-75055581652a@xymon.invalid wrote:
yes of cause but when you only use grep hobbitdboard is better i think. In my scripts i parse the XML file with some commands

e.g.
HOSTS=`$BBHOME/bin/bb 127.0.0.1 "hobbitdxboard"| $TR -d '\n'| sed 's#\(.*\)<StatusBoard>\(.*\)</StatusBoard>\(.*\)#\2#'|$SED 's#</ServerStatus>#\x0A#g'|$SED 's#\(.*\)<ServerName>\(.*\)</ServerName>\(.*\)#\2#'|$SORT -u`

with this you get all hostnames only once and sorted.

If you use it on console you must change the $SED etc to sed or something else.

by
Stefan
-- 
Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007
list Henrik Størner · Thu, 4 Jan 2007 17:42:44 +0100 ·
quoted from Rich Smrcina
On Thu, Jan 04, 2007 at 03:00:16PM +0100, user-75055581652a@xymon.invalid wrote:
To check for Hosts and Services i use this command
 ~/bin/bb 127.0.0.1 "hobbitdxboard"
(very good work)
but can you expand this to filter some thing
 ~/bin/bb 127.0.0.1 "hobbitdxboard server.domain.org"
so that only the data for this host will shown?
It's already there - see the bb(1) man-page for the filters you can
apply to the "hobbitdboard" command. You'll want this:
   ~/bin/bb 127.0.0.1 "hobbitdxboard host=server.domain.org"

BTW, you're the first person I know of who has used the XML format
output. So do speak up if you find something wrong with it, or some
information that is missing.
quoted from Rich Smrcina

And can you include something like that to get informations what RRD Files 
are available?
 ~/bin/bb 127.0.0.1 "hobbitrrdxboard"
No. This information is simply not present inside the Hobbit daemon.
You can look at the ~hobbit/data/rrd/server.domain.org/ directory and
see what rrd files are there, but that doesnt tell you what graphs may
be built from them (you need to dig into the hobbitgraph.cfg file to
figure that out). And in the next version of Hobbit, the rrd files may
be distributed over multiple Hobbit servers.

We do need a solution for this, but I haven't found a good way of doing
it yet.


Regards,
Henrik
list Stefan Freisler · Fri, 5 Jan 2007 09:47:42 +0100 ·
user-ce4a2c883f75@xymon.invalid (Henrik Stoerner) schrieb am 04.01.2007 17:42:44:
On Thu, Jan 04, 2007 at 03:00:16PM +0100, stefan.freisler at aspect-
quoted from Henrik Størner
online.de wrote:
To check for Hosts and Services i use this command
 ~/bin/bb 127.0.0.1 "hobbitdxboard"
(very good work)
but can you expand this to filter some thing
 ~/bin/bb 127.0.0.1 "hobbitdxboard server.domain.org"
so that only the data for this host will shown?
It's already there - see the bb(1) man-page for the filters you can
apply to the "hobbitdboard" command. You'll want this:
   ~/bin/bb 127.0.0.1 "hobbitdxboard host=server.domain.org"
Thx this is a good to hear! 
quoted from Henrik Størner
BTW, you're the first person I know of who has used the XML format
output. 
;-)
quoted from Henrik Størner
So do speak up if you find something wrong with it, or some
information that is missing.
No i'm happy with the xml output so far. I use it because i get better 
performance with it. In the next version of my Scripts i let the choice 
which one will used.
quoted from Henrik Størner
 
And can you include something like that to get informations what RRD 
Files 
are available?
 ~/bin/bb 127.0.0.1 "hobbitrrdxboard"
No. This information is simply not present inside the Hobbit daemon.
You can look at the ~hobbit/data/rrd/server.domain.org/ directory and
see what rrd files are there, but that doesnt tell you what graphs may
be built from them (you need to dig into the hobbitgraph.cfg file to
figure that out). And in the next version of Hobbit, the rrd files may
be distributed over multiple Hobbit servers.

We do need a solution for this, but I haven't found a good way of doing
it yet.
hmm, that is not good to hear ;-). I try to parse the Config but it is 
very complex and slow with an shell script i think, but if there is no 
other solution i have to do it ;-)

By
Stefan