Ad Widget

Collapse

Zabbix web scenario via Proxy on FreeBSD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bart_
    Junior Member
    • May 2012
    • 8

    #1

    Zabbix web scenario via Proxy on FreeBSD

    Hi everyone,

    I'm running into a little annoyance with the web scenario feature of zabbix.

    As things are right now I can only monitor things on our internal network, this is a requirement so that's ok. But we also have sites on the internet which we need to monitor, in our case the internet connection is running via a proxy server.

    In the wiki and in several forum posts I read the regular answer about the system variable. Somehow this doesn't work for us.

    What I've done so far:

    Set the proxy variable in the following files:

    --- Systemwide ---

    /etc/cshcshrc
    /etc/profile

    --- User specific ---

    /home/zabbix/.cshrc
    /home/zabbix/.profile
    /home/zabbix/.shrc

    The proxy entries look like this:

    # For bash/sh
    export http_proxy="http://proxy:3128"
    export https_proxy=$http_proxy
    export ftp_proxy=$http_proxy
    export all_proxy=$http_proxy
    export HTTP_PROXY=$http_proxy
    export HTTPS_PROXY=$http_proxy
    export FTP_PROXY=$http_proxy
    export ALL_PROXY=$http_proxy
    #export no_proxy=127.0.0.1
    #export NO_PROXY=127.0.0.1

    # For csh
    setenv http_proxy "http://proxy.intern.bkwi.nl:3128"
    setenv https_proxy $http_proxy
    setenv ftp_proxy $http_proxy
    setenv all_proxy $http_proxy
    setenv HTTP_PROXY $http_proxy
    setenv HTTPS_PROXY $http_proxy
    setenv FTP_PROXY $http_proxy
    setenv ALL_PROXY $http_proxy
    #setenv no_proxy 127.0.0.1
    #setenv NO_PROXY 127.0.0.1

    've tried countless variations to this, reboots, etc. Every single time it works from the commandline, when I change to the zabbix user I can see that the environment is spot on but also every time the web scenario's come with time-out errors.

    During testing I've used a webserver which has both an internal URL as en external URL (internet). On both URL's you get the same SSL cert + same application.

    When I connect internally (without a proxy) everything works like a charm, when I connect externally it shows a time-out error in the logs.

    Additionally to the above settings I've also tried creating these files:

    /home/zabbix/.librc
    /home/zabbix/.curlrc

    Both with similar contents, but also both don't work...

    At this point I've reverted back to having the proxy set in these two files:

    /etc/cshcshrc
    /etc/profile

    I've delibertly excluded the no_proxy variable, for now I want Zabbix to always send everything related to http/https towards the proxy. Via commandline this works, via libcurl it simply doesn't.....

    Help!!!

    I'm slowly losing my mind here, documentation says use the http_proxy environment variable but practice (in my case) shows that it doesn't work.

    The thing I need is rather simple, some sites have to go through the proxy (we only have one web proxy) and other sites have to go via the local network (defined in no_proxy).

    How do I get this to work?
    What am I doing wrong?
    And, is there a better way to do this? (e.g. configure a parameter inside the web scenario or in the host configuration????)

    Thanks in advance!!
  • Bart_
    Junior Member
    • May 2012
    • 8

    #2
    I realise I've forgotten to post a few specific details:
    • OS: FreeBSD 9
    • Zabbix version: 2.0.1


    Other then that things are quite normal on the OS side.

    Any suggestion would be great, I'm at a loss here when it comes to this proxy thing....

    Comment

    Working...