(Take 2) Re: Using proxy for http requests
list Japheth Cleaver
(Sorry, hit 'Send' a little too early there.) Agreed that that's probably something that should be taken into account as well. The key is the principle of least surprise for a sysadmin who's monitoring things. As to whether presuming the system proxy should be used or whether we should assume that testing http://www.example.net/ means testing just that, I'm not sure the answer to. There other big issue, in particular is that there's no specific syntax for *ignoring* a proxy, so before any sort of global override is allowed, there'd need to be a means for that. Regards, -jc On Sun, May 24, 2015 5:54 pm, Galen Johnson wrote:
So it won't honor the system proxy server environment variable (ie, export http_proxy=myproxy.example.com:3128)? Seems like a bit of an oversight...I could understand if you want to override the proxy to use something different but not just ignore it. Note...this is from the xymon server only. =G= From: J.C. Cleaver <user-87556346d4af@xymon.invalid> Sent: Sunday, May 24, 2015 2:55 PM To: Galen Johnson Cc: xymon at xymon.com Subject: Re: [Xymon] Using proxy for http requests On Sat, May 23, 2015 6:21 pm, Galen Johnson wrote:?Bumping this in case it got lost in the upgrade issue flood... =G= From: Xymon <xymon-bounces at xymon.com> on behalf of Galen Johnson
<user-87f955643e3d@xymon.invalid>
Sent: Thursday, May 21, 2015 11:25 AM To: xymon at xymon.com Subject: [Xymon] Using proxy for http requests I must be somewhat dense today but I need to use a proxy server for ALL http requests and I can't tell if I need to use --proxy (and if so, which stanza since this is a built-in server-side test) or if I just set the environment variable http_proxy= will work. I would prefer not to have to add it to all of my http tests individually and it's also not clear if that syntax will work for the "apache=" entries.I'm looking through the code and it seems that for xymonnet http testing
(as opposed to submitting messages via HTTP and xymoncgimsg.cgi), there's no universal way of specifying a proxy for all URLs that are being tested.
The proxy needs to be added to the URL as in https://www.xymon.com/help/manpages/man5/hosts.cfg.5.html#lbAR and then
--bb-proxy-syntax needs to tb enabled on the xymonnet command line https://www.xymon.com/help/manpages/man1/xymonnet.1.html#lbAH
http_proxy= (and --proxy) are used by the xymon command-line utility for submitting messages, but not testing. On the bright side, this _should_ work for apache= tests as well (along with any of the http test variants, like post/soap, etc). This seems like something that could be added in in a future release, either on a per-host, a per-.default.-host, a global variable basis. Regards, -jc
list Galen Johnson
Curl allows you to bypass the proxy with the '--noproxy' option. I have to say that as a sysadmin I was surprised that Xymon wouldn't honor my proxy setting ;-). Having "http_proxy" or "HTTP_PROXY" in the xymonserver.cfg file would seem reasonable...or even a "USE_SYSTEM_PROXY" defaults to "false" setting along with the PROXY_HOST and PROXY_PORT config option for when true (or assume false if PROXY_HOST is unset). You should still be able to define the proxy info in the hosts.cfg file to override the setting same as you would do today. I say this next statement not being a developer...seems like it would be easy to do :-). If I knew which files to tweak, I might even take a stab at it myself.
▸
=G= From: J.C. Cleaver <user-87556346d4af@xymon.invalid> Sent: Sunday, May 24, 2015 10:23 PM To: Galen Johnson Cc: xymon at xymon.com Subject: (Take 2) Re: [Xymon] Using proxy for http requests (Sorry, hit 'Send' a little too early there.) Agreed that that's probably something that should be taken into account as well. The key is the principle of least surprise for a sysadmin who's monitoring things. As to whether presuming the system proxy should be used or whether we should assume that testing http://www.example.net/ means testing just that, I'm not sure the answer to. There other big issue, in particular is that there's no specific syntax for *ignoring* a proxy, so before any sort of global override is allowed, there'd need to be a means for that. Regards, -jc On Sun, May 24, 2015 5:54 pm, Galen Johnson wrote:
So it won't honor the system proxy server environment variable (ie, export http_proxy=myproxy.example.com:3128)? Seems like a bit of an oversight...I could understand if you want to override the proxy to use something different but not just ignore it. Note...this is from the xymon server only. =G= From: J.C. Cleaver <user-87556346d4af@xymon.invalid> Sent: Sunday, May 24, 2015 2:55 PM To: Galen Johnson Cc: xymon at xymon.com Subject: Re: [Xymon] Using proxy for http requests On Sat, May 23, 2015 6:21 pm, Galen Johnson wrote:?Bumping this in case it got lost in the upgrade issue flood... =G= From: Xymon <xymon-bounces at xymon.com> on behalf of Galen Johnson
<user-87f955643e3d@xymon.invalid>
Sent: Thursday, May 21, 2015 11:25 AM To: xymon at xymon.com Subject: [Xymon] Using proxy for http requests I must be somewhat dense today but I need to use a proxy server for ALL http requests and I can't tell if I need to use --proxy (and if so, which stanza since this is a built-in server-side test) or if I just set the environment variable http_proxy= will work. I would prefer not to have to add it to all of my http tests individually and it's also not clear if that syntax will work for the "apache=" entries.I'm looking through the code and it seems that for xymonnet http testing
(as opposed to submitting messages via HTTP and xymoncgimsg.cgi), there's no universal way of specifying a proxy for all URLs that are being tested.
The proxy needs to be added to the URL as in https://www.xymon.com/help/manpages/man5/hosts.cfg.5.html#lbAR and then
--bb-proxy-syntax needs to tb enabled on the xymonnet command line https://www.xymon.com/help/manpages/man1/xymonnet.1.html#lbAH
http_proxy= (and --proxy) are used by the xymon command-line utility for submitting messages, but not testing. On the bright side, this _should_ work for apache= tests as well (along with any of the http test variants, like post/soap, etc). This seems like something that could be added in in a future release, either on a per-host, a per-.default.-host, a global variable basis. Regards, -jc