[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Editing thresholds from a web page.
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Editing thresholds from a web page.
- From: Steve Holmes <sholmes42 (at) gmail.com>
- Date: Thu, 9 Jul 2009 12:40:50 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=4VxL0OGJHJVSHGfYSirKjkJ8uFjVavE7q5o8mKZgPLc=; b=R6GXQkIYCyA9BrS2zVMJYenbN1i9rz/oRFfvRvueVTrfy8ylfQSv4EhU4SiWMPsRgr yMfR8/vMalSHOMzmhQc0LDc+4I3GlW+HuM9eFXJqs6DTqRj41scsWBfz8QVl0wYfQsh8 2vUHzxOr2uvSBtBrmZwkHIkSZL45fyhbQK1qM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:content-type; b=KqdJv93XWYEp7UHn+gsi6DQ57k8lnFfE1fDp0A2qDS912NOhshueUiebqbMx5YhYgf oyXbPB50uVY09f/vwleDDsXOScdklZO1+Td8/iGGrmXN4DODpMG1m8oeQNxpbu26hCS+ 8e+/w1wNb/6IPDNBzP7ogHFvXfejql9tMyef4=
- References: <OF41594697.92175673-ONCA2575DC.008215A0-CA2575DC.00823AFA (at) dpi.nsw.gov.au> <OF8DB411A5.061CB2C3-ONCA2575E6.00034848-CA2575E6.00035E2A (at) dpi.nsw.gov.au> <3d9395ed0907070051r208018abt4614df2fc096501f (at) mail.gmail.com> <8dca7fe00907070328kd43b7c8ic06a912efd966612 (at) mail.gmail.com> <43be87180907071322q31459549gff3b0b5e6b2b4aff (at) mail.gmail.com> <Pine.LNX.4.64.0907080801280.1866 (at) pal32.desy.de> <DE5E80B8710D499C9795EFE02E292EA8 (at) behemoth> <43be87180907081312g2bccf1ebsfd649a05b2d1287a (at) mail.gmail.com> <6A9849503F0447FEB5434880CE99D7A3 (at) behemoth>
Nope. Sorry. I got 0.2 and here are the changes I made to selection_page.pl.
The additions of the two 'next' statements are just speedups (I think :-),
but the critical change is the way you are testing to see if a line is a
real host line or not. All of my hosts have an IP of 0.0.0.0, and it looks
like you are wanting the second character of the line to be a digit, but
since the second character of my line is a dot ('.') it never matches. This
works for me wrt getting the hosts loaded, but it still doesn't change the
config file.
Thanks,
Steve
--- selection_page.pl Thu Jul 9 12:28:53 2009
***************
*** 44,49 ****
--- 44,50 ----
while( <BBHOST> ) {
chomp;
+ next if (/^\s*\#/ );
($leading, $data) = split( ' ' , $_ );
***************
*** 59,68 ****
foreach( @files ) {
open(FILE, $_);
while( <FILE> ) {
($leading, $data) = split( ' ' , $_ );
! if( substr( $leading, 1,1 ) ge 0 && substr(
$leading, 1, 1 ) le 9 ) {
$hosts{$data}{hostname} = $data;
}
}
--- 60,72 ----
foreach( @files ) {
open(FILE, $_);
while( <FILE> ) {
+ next if ( /^\s*\#/ );
($leading, $data) = split( ' ' , $_ );
! # if( substr( $leading, 1,1 ) ge 0 && substr(
$leading, 1, 1 ) le 9 ) {
! ($byte1,$byte2,$byte3,$byte4) =
split('\.',$leading);
! if ($byte1 ge 0 && $byte1 le 255) {
$hosts{$data}{hostname} = $data;
}
}
On Thu, Jul 9, 2009 at 3:43 AM, David Peters <davidp (at) electronf.com> wrote:
> Version 0.2 is now available for download. It fixes an issue relating to
> hosts not loading. Hopefully that was the one you saw Steve.
>
>
>
> It also fixes a couple of other minor things including removing a hardcoded
> directory in one of the html header files.
>
>
>
>
> ------------------------------
>
> *From:* Steve Holmes [mailto:sholmes42 (at) gmail.com]
> *Sent:* Thursday, 9 July 2009 6:13 AM
> *To:* hobbit (at) hswn.dk
> *Subject:* Re: [hobbit] Editing thresholds from a web page.
>
>
>
> Hi David,
>
>
>
> Ok, so I downloaded the scripts from sourceforge. I couldn't find them on
> xymonton. What I have might not be your latest. So, the fixes I had to make
> might be unneeded on a later version, but:
>
>
>
> The first thing was that the first edit-thresholds page had no hosts
> loaded. I fixed that. The next problem is that it isn't actually making the
> changes I've entered. An error from the web server (which might not have
> anything to do with this behavior) is:
>
>
>
> File does not exist: /opt/www2/htdocs/menu, referer:
> https://my-server/hobbit-seccgi/edit-thresholds/trunk/edit-threshold.pl
>
>
>
> It's true that my apache home
> dir is /opt/www2 and the htdocs dir is htdocs, but where is it getting the path to menu there, which doesn't exist. I've searched through everything I can think of. I've obviously overlooked something.
>
>
>
> If I fix this error and it still doesn't make the changes I'll look
> further.
>
>
>
> Any ideas? I'm excited to get this working. It should save me a significant
> amount of time if my co-admins could make these changes without asking me to
> edit the files!
>
>
>
> Thanks,
>
> Steve
>
>
>
> On Wed, Jul 8, 2009 at 4:54 AM, David Peters <davidp (at) electronf.com> wrote:
>
> Yes I think that might be a good idea. Just beware of the two bugs that
> currently exist.
>
>
>
> -----Original Message-----
> From: Martin Flemming [mailto:martin.flemming (at) desy.de]
> Sent: Wednesday, 8 July 2009 4:05 PM
> To: hobbit (at) hswn.dk
>
> Subject: Re: [hobbit] Editing thresholds from a web page.
>
>
> Hi, David !
>
> thanks, for the scripts !
>
> I recognize, that the scripts didn't make a backup of hobbit-clients.cfg
> ...
>
> Maybe, we could added a backupfunction with timestamp ?
>
> thanks & cheeers
>
> martin
>
> On Tue, 7 Jul 2009, Steve Holmes wrote:
>
> > The link seems to work now. From the OP:
> >
> >> Anyway, I have put it up on sourceforge: http://xymon-addons.svn.
> >> sourceforge.net/viewvc/xymon-addons/edit-thresholds/
> >
> > Download the tarball from the bottom of the page.
> >
> >
> > Steve.
> >
> > On Tue, Jul 7, 2009 at 6:28 AM, Shaun Phillips <
> > tainted.soul69 (at) googlemail.com> wrote:
> >
> >> Where can I get edit-thresholds.tar ?
> >>
> >>
> >> On Tue, Jul 7, 2009 at 8:51 AM, Cayo de Moraes
> <camorae (at) googlemail.com>wrote:
> >>
> >>> Hi David,
> >>>
> >>> infortunately i couldnt download it...
> >>> The "edit-thresholds.tar" file could not be found. Please select
> another
> >>> file
>
--
Do you wish to rise? Begin by descending. You plan a tower that will pierce
the clouds? Lay first the foundation of humility. -St. Augustine (354-430)
Truth never damages a cause that is just. -Mohandas Karamchand Gandhi
(1869-1948)