Ad Widget

Collapse

Web monitoring of non standard http port

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phong
    Junior Member
    • Jun 2016
    • 2

    #1

    Web monitoring of non standard http port

    I'm trying monitor a web site that's on a nonstandard http port but the http step of the "Web scenarios" always seems to goto port 80. I've tried different ways of specifying the port but the web monitor always goes to port 80. In the log file I see "Couldn't connect to server: Failed to connect to <IP>: Permission denied" (port 80 is not open).

    http://<site>:39999/test => Permission denied error

    http://<site>[39999]/test => Couldn't resolve host name: Could not resolve host: <site>[39999]; Name or service not known

    I've also tried the "simple check" item but I can't seem to find where to specify to validate a return code of 200. How can I monitor a web site on a non-standard port and check for return code of 200?

    Thanks.
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    In the first test, if you got the http 403 return code, the test is working. The web server isn't allowing your server (or proxy) access. You can test and verify that by using curl from the server/proxy monitoring that host.

    The second doesn't have the : separating the port from the dns part of the url.

    Comment

    • phong
      Junior Member
      • Jun 2016
      • 2

      #3
      Thanks for the reply LenR.

      I found the root cause of the problem. I'm posting what worked for me, in case anyone encounters this problem in the future. My mistake was assuming that the permission denied error was coming from the web server but it's actually coming from the local (Zabbix) machine. It seems that in order for Zabbix to use another port (other than 80 or 443), you need to grant it permission to the can_network.

      setsebool -P zabbix_can_network on

      After I ran the above, everything worked like a charm.

      PS. this was on Centos 7

      Comment

      • LenR
        Senior Member
        • Sep 2009
        • 1005

        #4
        I tend to assume that monitors like Zabbix proxies are configured to allow all outbound traffic. It sure makes life easier when they do :-)

        Comment

        Working...