Xymon Mailing List Archive search

urlplus.pl / xymongrep

8 messages in this thread

list Hermann-Josef Beckers · Thu, 23 Dec 2010 09:03:33 +0100 ·
Hi,

I'm trying to implement urlplus.pl with xymon 4.3.0-beta3.
But urlplus.pl complains:
"SSGIS01 not defined in bb-hosts - skipping". I'm using include-files for the server definitions. A grep shows a definition,
a call to xymongrep shows no output:

"xymon at linux-dmcl:~/server> grep -i urlplus etc/hosts* etc/hosts_Windows_Steinfurt:10.45.64.61 SSGIS01 # urlplus
xymon at linux-dmcl:~/server> bin/xymongrep urlplus xymon at linux-dmcl:~/server> bin/xymongrep urlplus  SSGIS01"

Does xymongrep have a problem with include files (despite the man page
saying otherwise) or do I need to correct some variables in urlplus.pl?

Thanks
hjb
list Dominique Frise · Thu, 23 Dec 2010 09:22:32 +0100 ·
quoted from Hermann-Josef Beckers
On 12/23/10 09:03 AM, Hermann-Josef Beckers wrote:
Hi,

I'm trying to implement urlplus.pl with xymon 4.3.0-beta3.
But urlplus.pl complains:
"SSGIS01 not defined in bb-hosts - skipping". I'm using
include-files for the server definitions. A grep shows a definition,
a call to xymongrep shows no output:

"xymon at linux-dmcl:~/server> grep -i urlplus etc/hosts*
etc/hosts_Windows_Steinfurt:10.45.64.61 SSGIS01 # urlplus
xymon at linux-dmcl:~/server> bin/xymongrep urlplus
xymon at linux-dmcl:~/server> bin/xymongrep urlplus SSGIS01"

Does xymongrep have a problem with include files (despite the man page
saying otherwise) or do I need to correct some variables in urlplus.pl?

Thanks
hjb
Hi,

Henrik released a patch for xymongrep/4.3.0.beta3:

Revision: 6592
           http://xymon.svn.sourceforge.net/xymon/?rev=6592&view=rev
Author:   storner
Date:     2010-11-16 20:46:52 +0000 (Tue, 16 Nov 2010)

Log Message:
xymongrep: Fix broken commandline parsing resulting from trying to be 
backwards-compatible. Reported by Jason Chambers.

Modified Paths:
     branches/4.3.0/common/xymongrep.c

Modified: branches/4.3.0/common/xymongrep.c
===================================================================
--- branches/4.3.0/common/xymongrep.c	2010-11-16 10:27:52 UTC (rev 6591)
+++ branches/4.3.0/common/xymongrep.c	2010-11-16 20:46:52 UTC (rev 6592)
@@ -146,7 +146,7 @@
  			printf("xymongrep version %s\n", VERSION);
  			exit(0);
  		}
-		else if ((strcmp(argv[argi], "--net") == 0) || (strcmp(argv[argi], 
"--bbnet"))) {
+		else if ((strcmp(argv[argi], "--net") == 0) || (strcmp(argv[argi], 
"--bbnet") == 0)) {
  			include2 = "netinclude";
  			onlypreferredentry = 0;
  		}


This was sent by the SourceForge.net collaborative development platform, 
the world's largest Open Source development site.

Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
Xymon-developer mailing list
user-834d44be5e50@xymon.invalid

Dominique
list Michael Nagel · Thu, 23 Dec 2010 09:27:15 +0100 ·
There is a bug in 4.3.0-beta3.
It is solved: http://www.xymon.com/archive/2010/11/msg00125.html
quoted from Hermann-Josef Beckers


-----Ursprüngliche Nachricht-----
Von: Hermann-Josef Beckers [mailto:user-3e5362deca72@xymon.invalid]
Gesendet: Donnerstag, 23. Dezember 2010 09:04
An: xymon at xymon.com
Betreff: [xymon] urlplus.pl / xymongrep


Hi, 
I'm trying to implement urlplus.pl with xymon 4.3.0-beta3. But urlplus.pl complains: "SSGIS01 not defined in bb-hosts - skipping". I'm using include-files for the server definitions. A grep shows a definition, a call to xymongrep shows no output: 

"xymon at linux-dmcl:~/server> grep -i urlplus etc/hosts* etc/hosts_Windows_Steinfurt:10.45.64.61        SSGIS01 # urlplus
xymon at linux-dmcl:~/server> bin/xymongrep urlplus xymon at linux-dmcl:~/server> bin/xymongrep urlplus  SSGIS01"

Does xymongrep have a problem with include files (despite the man page saying otherwise) or do I need to correct some variables in urlplus.pl? 
Thanks hjb
list Hermann-Josef Beckers · Thu, 23 Dec 2010 11:45:32 +0100 ·
Dominique Frise <user-78ab6673b600@xymon.invalid> schrieb am 23.12.2010 09:22:32:
quoted from Dominique Frise

...
Hi,

Henrik released a patch for xymongrep/4.3.0.beta3:

Revision: 6592
           http://xymon.svn.sourceforge.net/xymon/?rev=6592&view=rev
Author:   storner
Date:     2010-11-16 20:46:52 +0000 (Tue, 16 Nov 2010)

Log Message:
xymongrep: Fix broken commandline parsing resulting from trying to be backwards-compatible. Reported by Jason Chambers.

Modified Paths:
     branches/4.3.0/common/xymongrep.c

Modified: branches/4.3.0/common/xymongrep.c
===================================================================
--- branches/4.3.0/common/xymongrep.c   2010-11-16 10:27:52 UTC (rev 
6591)
+++ branches/4.3.0/common/xymongrep.c   2010-11-16 20:46:52 UTC (rev 
6592)
@@ -146,7 +146,7 @@
           printf("xymongrep version %s\n", VERSION);
           exit(0);
        }
-      else if ((strcmp(argv[argi], "--net") == 0) || 
(strcmp(argv[argi], 
"--bbnet"))) {
+      else if ((strcmp(argv[argi], "--net") == 0) || 
(strcmp(argv[argi], 
"--bbnet") == 0)) {
           include2 = "netinclude";
           onlypreferredentry = 0;
        }
...

Thanks Dominique (and Michael),

but that didn't help. It gives the same error. What confuses me is the fact
that my 4.3.0 version still uses the "bb*" names and not the "xymon*" names,
despite the webpage stating "xymon 4.3.0-beta3". And a "make install" doesn't
change the names. Should I take the latest tarball and install anew?

Yours
hjb
list Hermann-Josef Beckers · Thu, 23 Dec 2010 13:19:13 +0100 ·
"Hermann-Josef Beckers" <user-3e5362deca72@xymon.invalid> schrieb am 23.12.2010 11:45:32:

...
reply to myself:
quoted from Hermann-Josef Beckers
... Thanks Dominique (and Michael), 
but that didn't help. It gives the same error. What confuses me is the 
fact 
that my 4.3.0 version still uses the "bb*" names and not the "xymon*" 
names, 
despite the webpage stating "xymon 4.3.0-beta3". And a "make install" 
doesn't
change the names. Should I take the latest tarball and install anew? 
I took the 4.3.0.beta3 af of Nov 15. Seems what I had before was 4.3.0 as
of Nov 8. But the error persists.
list Hermann-Josef Beckers · Thu, 23 Dec 2010 14:29:42 +0100 ·
"Hermann-Josef Beckers" <user-3e5362deca72@xymon.invalid> schrieb am 23.12.2010 13:19:13:

...
... reply to myself: 
... > Thanks Dominique (and Michael), > > but that didn't help. It gives the same error. What confuses me isthe 
quoted from Hermann-Josef Beckers
fact 
that my 4.3.0 version still uses the "bb*" names and not the "xymon*" names, > despite the webpage stating "xymon 4.3.0-beta3". And a "make install" doesn't
change the names. Should I take the latest tarball and install anew? > I took the 4.3.0.beta3 af of Nov 15. Seems what I had before was 4.3.0 
as 
of Nov 8. But the error persists.
Sorry, hit the send button too early. If I run "xymongrep urlplus" I get the
correct line. Running urlplus.pl gives the same "not defined " message,
regardless whether I run it under XYMON control or from the commandline.
I changed the definition of BBDISP, BBPROG, BBHOSTGREP and CFGPATH to the
XYMON* definitions. 
Any hints?
hjb
list Henrik Størner · Thu, 23 Dec 2010 15:20:40 +0000 (UTC) ·
quoted from Hermann-Josef Beckers
In <user-ae4602cbed0f@xymon.invalid> "Hermann-Josef Beckers" <user-3e5362deca72@xymon.invalid> writes:
If I run "xymongrep urlplus" I get the
correct line. Running urlplus.pl gives the same "not defined " message,
regardless whether I run it under XYMON control or from the commandline.
I changed the definition of BBDISP, BBPROG, BBHOSTGREP and CFGPATH to the
XYMON* definitions. 
I'd guess that the urlplus.pl script doesn't use the "bbhostgrep" or
"xymongrep" tools to search the hosts.cfg (bb-hosts) file. But I 
haven't looked at this script, so I could be wrong.


Regards,
Henrik
list Hermann-Josef Beckers · Mon, 27 Dec 2010 09:47:54 +0100 ·
Henrik "Størner" <user-ce4a2c883f75@xymon.invalid> schrieb am 23.12.2010 16:20:40:

Hy Henrik,
quoted from Henrik Størner
...
I'd guess that the urlplus.pl script doesn't use the "bbhostgrep" or
"xymongrep" tools to search the hosts.cfg (bb-hosts) file. But I 
haven't looked at this script, so I could be wrong.
According to "grep -i grep urlplus.pl":

my $BBHOSTGREP = $ENV{'XYMONHOME'}."/bin/xymongrep";
my @hostgrepin = qx($BBHOSTGREP $BBTAG);
foreach $hostline (@hostgrepin)
my @hostgrepin = qx(cat $CFGPATH/$CFGFILE);
foreach $hostline (@hostgrepin)
            $url=qx(curl -S -s -k -m $tout -b $COOKIE_DIR $other -I $pstr 
$form "$url"|grep Location|sed "s/Location: //" 2>&1);
.

where $BBTAG contains "urlplus".

Yours
hjb