Ad Widget

Collapse

Add web proxy support to httppoller

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin312
    Junior Member
    • Nov 2009
    • 4

    #1

    Add web proxy support to httppoller

    I have a need to run different web scenarios through different explicit HTTP proxy servers, so I can compare the performance of the proxies.

    Our HTTP proxy requires authentication, and listens on TCP port 3128.

    I've attached a patch to "httptest.c" which enables the above, this was written for v1.6.5 but can easily be forward ported to the latest version of Zabbix.

    To use a non-authenticating proxy, you just include the name/IP and port in the variables section, like this:

    Code:
    {proxy}=10.231.91.8:3128
    Or to use a proxy that requires authentication, you can include a username, password, and optional authentication type.
    Attached Files
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    that's a neat feature, could you report it on the ZBXNEXT tracker and attach the patch ? thanks

    edit : oh, and please create unified diff - you can produce it with 'svn diff'
    Zabbix 3.0 Network Monitoring book

    Comment

    • duanew
      Junior Member
      • Feb 2010
      • 4

      #3
      Added to v1.8.1

      I used this for version 1.8.1 and it works well.

      The first time I applied the patch it puts the second lot of code in the wrong place.

      In v1.8.1 testhttp.c it inserted the code in between these lines:
      Code:
      while((row=DBfetch(result)) && !err_str)
      {
      I restored the code and manually inserted it about 6 lines earlier so it was before "DBselect" block of code. That is about line 342. The first block of code went in at line 268 as per the patch.

      Thanks for posting this code.
      Last edited by duanew; 26-02-2010, 04:53. Reason: Updating the details

      Comment

      • r0k5t4r
        Member
        • Jun 2009
        • 91

        #4
        Can't get it to work in 1.8.4. The httptest.c file is totally different in 1.8.4

        Comment

        Working...