Xymon Mailing List Archive search

Hobbit with MYSQL

list Henrik Størner
Thu, 4 Oct 2007 07:39:58 +0200
Message-Id: <user-7a91ed309af6@xymon.invalid>

On Wed, Oct 03, 2007 at 11:35:09PM -0400, Vashisht, Ashish wrote:
Has any one been able to get Hobbit data into MYSQL?
None that I know of, but for someone familiar with programming
for MySQL it shouldn't be difficult.

Basically, you would create a tool that reads the Hobbit data
off one of the hobbitd "channels" - those that feed you status
changes (for the history logs) or other kinds of data - and 
then store it in the database. The data you get from the channel
looks like

   @@stachg#1234|....|hostname|testname|....
   status hostname.testname green 4 oct 2007 07:37 OK

   This is the test result
   @@

so write something in perl or whatever your favourite language is to
pick up those, and store it in the DB. There's a sample perl program
in the Hobbit source of the snapshots, snapshot/hobbitd/hobbitd_rootlogin.pl

Then run this program from hobbitlaunch with
   hobbitd_channel --channel=stachg myprogram


Henrik