[hobbit] Sample of Hobbit server-side module (was: Who Test)

Richard Leon rleon at racenter.com
Mon Jan 29 19:52:38 CET 2007


Am I missing something?
The rootlogin.pl is not working .

Here is the log

PID 20669, cause Bad file number
2007-01-29 12:53:49 Our child has failed and will not talk to us: Channel
client, PID 20669, cause Bad file number
2007-01-29 12:54:04 Our child has failed and will not talk to us: Channel
client, PID 20669, cause Bad file number

Thanks
Richard


-----Original Message-----
From: Henrik Stoerner [mailto:henrik at hswn.dk] 
Sent: Sunday, January 28, 2007 6:48 AM
To: hobbit at hswn.dk
Subject: [hobbit] Sample of Hobbit server-side module (was: Who Test)

On Sat, Jan 27, 2007 at 09:29:12AM +0100, Henrik Stoerner wrote:
> On Fri, Jan 26, 2007 at 05:51:49PM -0600, Richard Leon wrote:
> > I have noticed that the client collects all of the data and then the
server
> > "tests" the condition.
> > 
> > How would I go about writing a who script that would tell me when
someone is
> > logged in as root?
>
> For someone familiar with Perl, I think it should be fairly
straight-forward.

I'm not familiar with Perl at all, but a couple of hours work produced
this, which appears to work fine. I'll include it as a sample of how to
hook into the Hobbit server-side channels.

To use it, put it in your ~hobbit/server/ext/ directory, and add this to
your hobbitlaunch.cfg on your server:

[rootlogin]
	ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
	NEEDS hobbitd
	CMD hobbitd_channel --channel=client
--log=$BBSERVERLOGS/rootlogin.log $BBHOME/ext/rootlogin.pl


Regards,
Henrik




More information about the Xymon mailing list