Hi,
We want to (mis)use the hobbit client-server communication to send oracle information to a hobbit server. Thx to Henrik for the perl demo, I know how to write a perl script that I can use on the hobbit server to receive the information by hooking it in the a channel.
I can use the client channel for this, but I think it's better if I create an extra channel for this. I took a quick look at the code, but I can barely and understand the code :(
So, has anyone changed the hobbit server code and added an extra channel and want to share his changes ?
Stef
Hi,
Stef Coene wrote :
I can use the client channel for this, but I think it's better if I create an extra channel for this. I took a quick look at the code, but I can barely and understand the code :(
I will do that, because I currently misuse the "notes" channel for inventory purposes and using hobbit as a gateway (because monitoring is the only thing guaranteed to be open on the firewalls). If you can wait a month or so (I have a few more-than-urgent task to finish), I'll submit the patch to the list. The new channels could be "user1" and "user2".
-- Charles Goyard - cgoyard at cvf.fr - (+33) 1 45 38 01 31
On Wednesday 07 February 2007 10:28, Charles Goyard wrote:
Hi,
Stef Coene wrote :
I can use the client channel for this, but I think it's better if I create an extra channel for this. I took a quick look at the code, but I can barely and understand the code :(
I will do that, because I currently misuse the "notes" channel for inventory purposes and using hobbit as a gateway (because monitoring is the only thing guaranteed to be open on the firewalls). If you can wait a month or so (I have a few more-than-urgent task to finish), I'll submit the patch to the list. The new channels could be "user1" and "user2". Mhh, I can not wait a month. If I'm first with a patch, I will post it here ;)
Stef
On Tue, Feb 06, 2007 at 04:47:55PM +0100, Stef Coene wrote:
We want to (mis)use the hobbit client-server communication to send oracle information to a hobbit server. Thx to Henrik for the perl demo, I know how to write a perl script that I can use on the hobbit server to receive the information by hooking it in the a channel.
I can use the client channel for this, but I think it's better if I create an extra channel for this. I took a quick look at the code, but I can barely and understand the code :(
So, has anyone changed the hobbit server code and added an extra channel and want to share his changes ?
The attached patch should do it. It creates a "user" channel that is fed the messages you send with $BB $BBDISP "usermsg HOSTNAME ... your custom message here ..."
On the server side, run hobbitd_channel --channel=user YOURCUSTOMCOMMAND to pick up the messages.
I've set the max size of such messages at 128 KB (random number), but you can tune it by setting MAXMSG_USER to something else and restarting Hobbit. Note that as always, OS limits may need to be tweaked since this adds an extra shared memory segment and a couple of semaphore items. If you suddenly cannot start Hobbit and it complains about "cannot setup user channel", then that's your problem.
Henrik
On Wednesday 07 February 2007 12:50, Henrik Stoerner wrote:
The attached patch should do it. It creates a "user" channel that is fed the messages you send with $BB $BBDISP "usermsg HOSTNAME ... your custom message here ..."
On the server side, run hobbitd_channel --channel=user YOURCUSTOMCOMMAND to pick up the messages.
I've set the max size of such messages at 128 KB (random number), but you can tune it by setting MAXMSG_USER to something else and restarting Hobbit. Note that as always, OS limits may need to be tweaked since this adds an extra shared memory segment and a couple of semaphore items. If you suddenly cannot start Hobbit and it complains about "cannot setup user channel", then that's your problem.
Henrik Henrik, if you are ever in Belgium of the Netherlands, let me know, and I will be you a drink. Nice job.
Stef
Henrik Stoerner wrote :
The attached patch should do it. It creates a "user" channel
Well, same thing, if you come to France, be my guest :)
Will this patch be integrated in the mainstream hobbit ?
Regards,
-- Charles Goyard - cgoyard at cvf.fr - (+33) 1 45 38 01 31
On Wed, Feb 07, 2007 at 01:48:00PM +0100, Charles Goyard wrote:
Henrik Stoerner wrote :
The attached patch should do it. It creates a "user" channel
Well, same thing, if you come to France, be my guest :)
Thanks - I'll let everyone know in advance if I plan to go abroad :-)
Will this patch be integrated in the mainstream hobbit ?
In some form, yes. I may change it slighly so you can choose how many such channels you want - with the default being zero. But that won't affect how it works from your point of view, so feel free to apply this patch and use it.
Regards, Henrik
On Wednesday 07 February 2007 14:41, Henrik Stoerner wrote:
In some form, yes. I may change it slighly so you can choose how many such channels you want - with the default being zero. But that won't affect how it works from your point of view, so feel free to apply this patch and use it. Since you are acting fast in writing nice patches, I also need ssl support ;)
Stef
participants (3)
-
cgoyard@cvf.fr
-
henrik@hswn.dk
-
stef.coene@docum.org