Adding data to a client
list Asif Iqbal
I like to use `bb data hostname.serial<newline><the serial number>' to hobbit server. I do not want a column to be created. Then is it possible to query the serial number from within hobbit server using `bb query hostname.serial' just for the serial info? I don't want the data to expire. I guess I could test it myself. I dont want this data in the info column since it is suppose to be confidential due to support contract with SUN. -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
list Henrik Størner
▸
On Tue, Oct 17, 2006 at 02:31:18PM -0400, Asif Iqbal wrote:
I like to use `bb data hostname.serial<newline><the serial number>' to hobbit server. I do not want a column to be created. Then is it possible to query the serial number from within hobbit server using `bb query hostname.serial' just for the serial info?
Hobbit doesn't store information received in "data" messages. You'll have to handle that yourself - but writing a "data" backend module isn't all that difficult. Basically, you'll need to write a script that handles input like what you'll get if you run this command on your Hobbit server (as the hobbit user): ~hobbit/server/bin/bbcmd hobbitd_channel --channel=data cat It looks like this (this is from the "vmstat" data): @@data#14769|1161119241.285339|127.0.0.1||client2.hswn.dk|vmstat data client2,hswn,dk.vmstat linux 0 0 8316 84916 87264 1125020 0 0 0 69 468 682 3 1 96 0 @@ So: One line with the meta-info (timestamp, source IP, hostname, dataname), and then all of the data sent in the "data" command. The "@@" on a line by itself means "end-of-message". Once your custom backend gets the data, it is up to you to figure out some way of retriving it. Another solution would be to include this in the Hobbit "client" message. E.g. if you append this to the client message: [serial] 1234567 then you can query it through the URL http://hobbitserver/hobbit-cgi/bb-hostsvc.sh?CLIENT=myhost&SECTION=serial
▸
I don't want the data to expire. I guess I could test it myself. I dont want this data in the info column since it is suppose to be confidential due to support contract with SUN.
OK, the client data is visible to anyone - so for confidential data, it is probably not a good idea. Regards, Henrik
list Henrik Størner
▸
On Tue, Oct 17, 2006 at 11:12:53PM +0200, Henrik Stoerner wrote:
On Tue, Oct 17, 2006 at 02:31:18PM -0400, Asif Iqbal wrote:I like to use `bb data hostname.serial<newline><the serial number>' to hobbit server. I do not want a column to be created. Then is it possible to query the serial number from within hobbit server using `bb query hostname.serial' just for the serial info?Hobbit doesn't store information received in "data" messages.
Doh ... it does if you enable the [bbdata] task in hobbitlaunch.cfg. That gives you the data contents in the ~hobbit/data/data/HOSTNAME files. Regards, Henrik
list Asif Iqbal
▸
On 10/17/06, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:
On Tue, Oct 17, 2006 at 11:12:53PM +0200, Henrik Stoerner wrote:On Tue, Oct 17, 2006 at 02:31:18PM -0400, Asif Iqbal wrote:I like to use `bb data hostname.serial<newline><the serial number>' to hobbit server. I do not want a column to be created. Then is it possible to query the serial number from within hobbit server using `bb query hostname.serial' just for the serial info?Hobbit doesn't store information received in "data" messages.Doh ... it does if you enable the [bbdata] task in hobbitlaunch.cfg. That gives you the data contents in the ~hobbit/data/data/HOSTNAME files.
I were able to send the data using `bb 1.2.3.4 "data host.serial<newline>123456" where 123456 is the host's serial number. I ofcourse needed to enable [bbdata] as you suggested. Now is there a way I can pull the info using a `bb' command. I see the file in ~hobbit/data/data/HOSTNAME.serial in the hobbit server. Also will it expire after a default time? I like it not to Thanks -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
list Asif Iqbal
▸
On 10/17/06, Asif Iqbal <user-6f4b51ac2a40@xymon.invalid> wrote:
On 10/17/06, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:On Tue, Oct 17, 2006 at 11:12:53PM +0200, Henrik Stoerner wrote:On Tue, Oct 17, 2006 at 02:31:18PM -0400, Asif Iqbal wrote:I like to use `bb data hostname.serial<newline><the serial number>' to hobbit server. I do not want a column to be created. Then is it possible to query the serial number from within hobbit server using `bb query hostname.serial' just for the serial info?Hobbit doesn't store information received in "data" messages.Doh ... it does if you enable the [bbdata] task in hobbitlaunch.cfg. That gives you the data contents in the ~hobbit/data/data/HOSTNAME files.I were able to send the data using `bb 1.2.3.4 "data host.serial<newline>123456" where 123456 is the host's serial number. I ofcourse needed to enable [bbdata] as you suggested. Now is there a way I can pull the info using a `bb' command. I see the file in ~hobbit/data/data/HOSTNAME.serial in the hobbit server. Also will it expire after a default time? I like it not to
Still like to find out how to craft a `bb' command to get the
HOSTNAME.serial output which is `data' type and not `status' type. Also how
do I let it not expire unless a new `bb' command is sent to update the
"serial" `data' type?
Thanks
▸
Thanks-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu