[hobbit] acks & maint.pl aren't working

Henrik Stoerner henrik at hswn.dk
Tue Apr 12 22:10:59 CEST 2005


On Tue, Apr 12, 2005 at 02:59:06PM -0400, Tom Georgoulias wrote:
> Henrik Stoerner wrote:
> >
> >>I'm getting the same "maint.pl: Use of uninitialized value..." error, but
> >>the times don't correspond with my ack attempts.
> >
> >
> >No, that's from the enable/disable script. I'm getting pretty fed up
> >with maint.pl and Perl - it's on the "must rewrite" list now.
> 
> I think I have a fix now, thanks to a more perl knowledgable co-worker. 
>  Try replacing the regular expressions for lines 217 and 222 in 
> maint.pl with these:
> 
> if ($bbpagepath =~ /^([-_\/\@.]|\w)+$/)
> 
> if ($hostcookie =~ /^([-_\/\@.]|\w)+$/)

I must admit that I don't quite grasp the deeper logic behind this,
but if you say it works, then fine with me.

Still, I do prefer to use code that I understand. So rewriting
maint.pl is still on my agenda - first step was to implement a
mechanism to schedule future enable/disable tasks in the Hobbit
daemon, instead of having to use cron from a CGI script (that part of
maint.pl has always worried me from a security perspective, and it's
an area that is mildly incompatible between Unix systems). That is
working now, so next step is to setup the webpage layout to use.

(For the curious among you: I've implemented a new "schedule" command
in the Hobbit protocol, so you can do things like

    bb 127.0.0.1 "schedule `date +%s --date='tomorrow 13:30'` disable www.foo.com.http 1h Network upgrade"

But it isn't limited to just enable/disable, you can put any Hobbit
command there - e.g. a command to drop a host at a certain time).


Henrik



More information about the Xymon mailing list