Wish for next Hobbit Version
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
I've never used hobbitdxboard, but could you pipe it through grep?
stefan.freisler at aspect-online.de 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: 414-491-6001 Ans Service: 360-715-2467 rich.smrcina at vmassist.com
Catch the WAVV! http://www.wavv.org WAVV 2007 - Green Bay, WI - May 18-22, 2007
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
OK, I wasn't aware it came out as XML.
stefan.freisler at aspect-online.de 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 -uwith 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: 414-491-6001 Ans Service: 360-715-2467 rich.smrcina at vmassist.com
Catch the WAVV! http://www.wavv.org WAVV 2007 - Green Bay, WI - May 18-22, 2007
On Thu, Jan 04, 2007 at 03:00:16PM +0100, stefan.freisler at aspect-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"
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.
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
henrik at hswn.dk (Henrik Stoerner) schrieb am 04.01.2007 17:42:44:
On Thu, Jan 04, 2007 at 03:00:16PM +0100, stefan.freisler at aspect- 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!
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.
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.
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
participants (3)
-
henrik@hswn.dk
-
rsmrcina@wi.rr.com
-
stefan.freisler@aspect-online.de