lib/url.c patch for '/http' malformed url?
As discussed at http://www.xymon.com/archive/2006/07/msg00515.html:
On Mon, Jul 31, 2006 at 06:50:19PM +0200, Nicolas wrote:
It doesn t like the "%3a" strings.
Apparently not. OK, so this will require a code change. For a quick fix, you can edit the lib/url.c file in your Hobbit source. Around line 560-570 or so you'll see these lines:
if (poststart) getescapestring(poststart, &bburl->postdata, NULL); if (expstart) getescapestring(expstart, &bburl->expdata, NULL); p = strstr(urlstart, "/http"); <--- find this line if (p) { proxystart = urlstart; urlstart = (p+1); *p = '\0'; } parse_url(urlstart, bburl->desturl);Replace the line I've marked with
p = NULL;That will simply disable the proxy url function, and your original URL should work as intended.
Regards, Henrik
Hi Henrik,
Obviously it's not the ":" and I wish I would've searched the mailing list earlier ;)
# /usr/libexec/hobbit/server/bin/bbtest-net
2010-10-08 14:31:38 Malformed URL - no 'scheme:' in 'http-proxy-tcp'
2010-10-08 14:31:38 Invalid URL for http test - ignored:
cont=postgresql;http://my.athabascau.ca/http-proxy-tcp;0
Changed that to:
cont=postgresql;http://my.athabascau.ca/tohack;0
and it works well.
Do you have any plans to release an update?
Thanks, Viorel
In <201010081646.33845.viorel at athabascau.ca> Viorel Tabara <viorel at athabascau.ca> writes:
Obviously it's not the ":" and I wish I would've searched the mailing list earlier ;)
/usr/libexec/hobbit/server/bin/bbtest-net
2010-10-08 14:31:38 Malformed URL - no 'scheme:' in 'http-proxy-tcp' 2010-10-08 14:31:38 Invalid URL for http test - ignored: cont=postgresql;http://my.athabascau.ca/http-proxy-tcp;0
Changed that to: cont=postgresql;http://my.athabascau.ca/tohack;0 and it works well.
Sorry, I need a bit more context with this. The test-spec you've posted: cont=postgresql;http://my.athabascau.ca/http-proxy-tcp;0 works fine, and would not hit the problem discussed in the mail you referenced. I just ran it on my test box:
$ bbcmd bbhostgrep "cont=pos*" 172.16.10.193 testhost # cont=postgresql;http://my.athabascau.ca/http-proxy-tcp $ bbcmd bbtest-net --noping winxptest --no-update combo status+30 winxptest.http clear Sat Oct 9 08:10:42 2010: OK
&clear http://my.athabascau.ca/http-proxy-tcp - failed
HTTP/1.1 404 /http-proxy-tcp Date: Sat, 09 Oct 2010 06:10:42 GMT Content-Type: text/html;charset=utf-8 Content-Length: 983 Connection: close
Seconds: 0.39
Do you have any plans to release an update?
Not until I know what the problem is you're having.
Regards, Henrik
On Sat, 09 Oct 2010 06:17:34 +0000 (UTC), Henrik Størner <henrik at hswn.dk> wrote to xymon at xymon.com and CC-ed to :
Sorry, I need a bit more context with this.
Let me know if you need more info. Thanks.
yellow Tue Oct 12 12:40:00 2010
bbtest-net version 4.2.0
SSL library : OpenSSL 0.9.8b 04 May 2006
LDAP library: OpenLDAP 20327
Error output:
Malformed URL - no 'scheme:' in 'http-proxy-tcp'
Invalid URL for http test - ignored:
http://my-test.athabascau.ca/http-proxy-tcp
TIME SPENT
Event Starttime
Duration
bbtest-net startup 1286908800.102410
-
Service definitions loaded 1286908800.103349
0.000939 Tests loaded 1286908800.109072
0.005723 DNS lookups completed 1286908800.111161
0.002089 Test engine setup completed 1286908800.113815
0.002654 TCP tests completed 1286908810.998280
0.000523 PING test results sent 1286908810.999242
0.000439 Test result collection completed 1286908810.999260
0.000018 LDAP test engine setup completed 1286908810.999267
0.000007 LDAP tests executed 1286908810.999268
0.000001 LDAP tests result collection completed 1286908810.999269
0.000001 Test results transmitted 1286908811.000001
0.000732 bbtest-net completed 1286908811.001300
0.001299 TIME TOTAL
10.898890
Den Tue, 12 Oct 2010 12:03:59 -0700 skrev Viorel Tabara:
On Sat, 09 Oct 2010 06:17:34 +0000 (UTC), Henrik Størner <henrik at hswn.dk> wrote to xymon at xymon.com and CC-ed to :
Sorry, I need a bit more context with this.
Let me know if you need more info. Thanks.
yellow Tue Oct 12 12:40:00 2010 bbtest-net version 4.2.0 SSL library : OpenSSL 0.9.8b 04 May 2006 LDAP library: OpenLDAP 20327 Error output: Malformed URL - no 'scheme:' in 'http-proxy-tcp' Invalid URL for http test - ignored: http://my-test.athabascau.ca/http-proxy-tcp
It's the result of Xymon having support built-in for the old "Big Brother" tool way of specifying a proxy to use for web tests. The next version of Xymon will have this disabled by default, and this error should go away.
If you want to try it out, you can download the current development version of Xymon from Sourceforge.
Regards, Henrik
On Tue, 12 Oct 2010 20:20:05 +0000 (UTC), Henrik Størner <henrik at hswn.dk> wrote to xymon at xymon.com and CC-ed to :
Den Tue, 12 Oct 2010 12:03:59 -0700 skrev Viorel Tabara:
On Sat, 09 Oct 2010 06:17:34 +0000 (UTC), Henrik Størner
<henrik at hswn.dk> wrote to xymon at xymon.com and CC-ed to :
Sorry, I need a bit more context with this.
Let me know if you need more info. Thanks.
yellow Tue Oct 12 12:40:00 2010 bbtest-net version 4.2.0 SSL library : OpenSSL 0.9.8b 04 May 2006 LDAP library: OpenLDAP 20327 Error output: Malformed URL - no 'scheme:' in 'http-proxy-tcp' Invalid URL for http test - ignored: http://my-test.athabascau.ca/http-proxy-tcpIt's the result of Xymon having support built-in for the old "Big Brother" tool way of specifying a proxy to use for web tests. The next version of Xymon will have this disabled by default, and this error should go away.
If you want to try it out, you can download the current development version of Xymon from Sourceforge.
Appreciate the answer. Thanks.
From the xymon.com webpage is this snippit...
Combined super-tests and test interdependencies ... Tests can also be configured to depend on each other, so that when a critical router goes down you will get alerts only for the router - and not from the 200 hosts behind the router.
I'm not seeing how to set this type of testing up, basically event correlation, so that if a switch goes down, hobbit knows not to send alerts for each connected host.
Can some point me in the right direction, i.e. specific man-page, or just show me an example of how to configure this?
Thanks, Taylor
Hi.
Use the "route" setting. For each connected device, add "route:switch.company.com". That way, if the conn test of the switch fails, any conn test for the connected devices will go yellow instead of red.
/Johan
-----Original Message----- From: Taylor Lewick [mailto:tlewick at tradebotsystems.com] Sent: den 13 oktober 2010 18:01 To: xymon at xymon.com Subject: [xymon] xymon test dependencies
From the xymon.com webpage is this snippit...
Combined super-tests and test interdependencies ... Tests can also be configured to depend on each other, so that when a critical router goes down you will get alerts only for the router - and not from the 200 hosts behind the router.
I'm not seeing how to set this type of testing up, basically event correlation, so that if a switch goes down, hobbit knows not to send alerts for each connected host.
Can some point me in the right direction, i.e. specific man-page, or just show me an example of how to configure this?
Thanks, Taylor
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe at xymon.com
OK, thanks, any opinions on whether it is better to use route, or depends?
-----Original Message----- From: Johan Sjöberg [mailto:johan.sjoberg at deltamanagement.se] Sent: Wednesday, October 13, 2010 12:34 PM To: xymon at xymon.com Subject: [xymon] RE: xymon test dependencies
Hi.
Use the "route" setting. For each connected device, add "route:switch.company.com". That way, if the conn test of the switch fails, any conn test for the connected devices will go yellow instead of red.
/Johan
-----Original Message----- From: Taylor Lewick [mailto:tlewick at tradebotsystems.com] Sent: den 13 oktober 2010 18:01 To: xymon at xymon.com Subject: [xymon] xymon test dependencies
From the xymon.com webpage is this snippit...
Combined super-tests and test interdependencies ... Tests can also be configured to depend on each other, so that when a critical router goes down you will get alerts only for the router - and not from the 200 hosts behind the router.
I'm not seeing how to set this type of testing up, basically event correlation, so that if a switch goes down, hobbit knows not to send alerts for each connected host.
Can some point me in the right direction, i.e. specific man-page, or just show me an example of how to configure this?
Thanks, Taylor
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe at xymon.com
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe at xymon.com
Last I checked, the depends wasn't working properly and I haven't seen a release.
--Patrick
On Wed, Oct 13, 2010 at 1:54 PM, Taylor Lewick <tlewick at tradebotsystems.com>wrote:
OK, thanks, any opinions on whether it is better to use route, or depends?
-----Original Message----- From: Johan Sjöberg [mailto:johan.sjoberg at deltamanagement.se] Sent: Wednesday, October 13, 2010 12:34 PM To: xymon at xymon.com Subject: [xymon] RE: xymon test dependencies
Hi.
Use the "route" setting. For each connected device, add "route: switch.company.com". That way, if the conn test of the switch fails, any conn test for the connected devices will go yellow instead of red.
/Johan
-----Original Message----- From: Taylor Lewick [mailto:tlewick at tradebotsystems.com] Sent: den 13 oktober 2010 18:01 To: xymon at xymon.com Subject: [xymon] xymon test dependencies
From the xymon.com webpage is this snippit...
Combined super-tests and test interdependencies ... Tests can also be configured to depend on each other, so that when a critical router goes down you will get alerts only for the router - and not from the 200 hosts behind the router.
I'm not seeing how to set this type of testing up, basically event correlation, so that if a switch goes down, hobbit knows not to send alerts for each connected host.
Can some point me in the right direction, i.e. specific man-page, or just show me an example of how to configure this?
Thanks, Taylor
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe at xymon.com
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe at xymon.com
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe at xymon.com
On Wednesday, 13 October 2010 19:06:08 Patrick Nixon wrote:
Last I checked, the depends wasn't working properly and I haven't seen a release.
This works for me: a.b.c.d dnscache1.xxxx # dns=a:www.google.com testip depends=(dns:UPSTREAMLINK/conn)
(where UPSTREAMLINK is the name of a bb-hosts entry that has a conn check for our next hop(s)).
If UPSTERAMLINK.conn is red, and the dns test fails, it goed clear instead of red (well, it can be red for a brief period, so one should alert on red with DURATION greater than the time your bbtest-net cycle actually takes - in my case the time taken when DNS is unavailable)
If you have a case where it is not working according to the documentation, please discuss and file a bug if necessary.
Note though that depends only works for tests run by bbtest-net, AFAIK you can't have a network check depending on a ports (client data) check, or have one host checked by one bbtest-net instance depend on a network test checked by another bbtest-net instance. This is covered in the bb-hosts(5) coverage for the 'depends' tag.
Regards, Buchan
Il 14/10/2010 11.09, Buchan Milne ha scritto:
On Wednesday, 13 October 2010 19:06:08 Patrick Nixon wrote:
Last I checked, the depends wasn't working properly and I haven't seen a release.
This works for me: a.b.c.d dnscache1.xxxx # dns=a:www.google.com testip depends=(dns:UPSTREAMLINK/conn)
(where UPSTREAMLINK is the name of a bb-hosts entry that has a conn check for our next hop(s)).
If UPSTERAMLINK.conn is red, and the dns test fails, it goed clear instead of red (well, it can be red for a brief period, so one should alert on red with DURATION greater than the time your bbtest-net cycle actually takes - in my case the time taken when DNS is unavailable)
If you have a case where it is not working according to the documentation, please discuss and file a bug if necessary.
Note though that depends only works for tests run by bbtest-net, AFAIK you can't have a network check depending on a ports (client data) check, or have one host checked by one bbtest-net instance depend on a network test checked by another bbtest-net instance. This is covered in the bb-hosts(5) coverage for the 'depends' tag.
It would be great if it could work for all the test
Marco
Regards, Buchan
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe at xymon.com
Hi, I changed the name of the image with the image, and I made it clickable
168,180c172,173 < if (showcolors) { < printf(" - "); < if (addlink) { < printf("<a href=\"%s\">", hostsvcurl(hostname, testname, 1)); < printf("<img src=\"/gifs/%s", colorstr); < printf(".gif\" width=\"16\" height=\"16\" border=0 alt=\"%s\"", colorstr); < printf("title=\"%s\"", colorstr); < printf("></a>"); < } < else { < printf("<IMG SRC=\"/gifs/%s", colorstr); < printf(".gif\" >"); < }
if (showcolors) printf(" - %s", colorstr);
Marco
participants (7)
-
bgmilne@staff.telkomsa.net
-
henrik@hswn.dk
-
johan.sjoberg@deltamanagement.se
-
marco.avvisano@regione.toscana.it
-
pnixon@gmail.com
-
tlewick@tradebotsystems.com
-
viorel@athabascau.ca