Ad Widget

Collapse

How to monitor HTTP URLs by Zabbix agents

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    How to monitor HTTP URLs by Zabbix agents

    Hi All
    I have a monitoring scenario that I want to monitors some HTTP URLs that are in a LAN and send the results to the Zabbix server on the Internet. Zabbix can be used for monitoring HTTP URLs without using agents, then the main server is to monitor the HTTP URLs directly in web monitoring scenarios and the URLs should be visible for the Zabbix server. But in my scenario the HTTP services are behind the NAT then I should use 'Zabbix active agents' to monitor them.
    I couldn't Find any item in Zabbix agents for this purpose. Does anyone know that how should I do this task?

    Regards
    Sajad

    #2
    Hello,

    You should use HTTP Agent, once you can bind it to your Zabbix Agent interface, so your agent works like a "tunnel".
    https://www.zabbix.com/documentation...itemtypes/http

    Comment


    • Sajad
      Sajad commented
      Editing a comment
      You mean I have to define a HTTP agent on the monitored host? I tried to do this, and configured the URL that I have to monitor. But on the server side I just see the error message of "connection time out". I guess that I need something like zabbix proxy in local network to perform HTTP checks in local network.

    #3
    You mean I have to define a HTTP agent on the monitored host? I tried to do this, and configured the URL that I have to monitor. But on the server side I just see the error message of "connection time out". I guess that I need something like zabbix proxy in local network to perform HTTP checks in local network.
    If your Zabbix Server can see your Agent and your Agent can see the HTTP URL that you want to monitor you don't need a proxy. If you are receiving a timeout response, either your Zabbix Server can't reach your agent or your agent can't reach your HTTP URL.

    I have this scenario and it works just fine:
    Zabbix Server (Network 192.168.20.9) => Zabbix Agent (Two networks 192.168.20.90 and 10.8.0.8) => HTTP URL (10.8.0.10)
    Where the Zabbix Server can't see directly the HTTP URL, and have configured a HTTP Agent on that Zabbix Agent and it works OK.

    You should SSH into your server where the agent is running and try to perform the check via CURL and check how long does it take. Probably either you're not reaching the HTTP URL or the time to reach it is too long, so it returns a timeout to Zabbix Server.

    Comment


      #4
      Originally posted by brunohl View Post
      You should use HTTP Agent, once you can bind it to your Zabbix Agent interface, so your agent works like a "tunnel".
      https://www.zabbix.com/documentation...itemtypes/http
      Hi!

      What kind of binding you mean here? HTTP Agent works from server or from proxy. In case of web check from agent you need to use items like web.page.get. Am I not right?

      P.S. Or you added additional interface of Agent (192.168.20.90) to server (192.168.20.9) and used that interface for HTTP Agent item and it worked?

      Comment


        #5
        For my case, I'm using useparameter with curl command to check if a http site is avalaible.
        But I dont know if you can create a complex scenario.

        Comment


          #6
          When you're configuring HTTP Agent check you must select an interface, which is the Zabbix Agent Interface.

          Look at the screenshots
          Attached Files

          Comment


            #7
            Originally posted by brunohl View Post
            When you're configuring HTTP Agent check you must select an interface, which is the Zabbix Agent Interface.
            Just did it and as documentation says request was from server but not from agent.

            Comment


              #8


              Originally posted by brunohl View Post
              Hello,

              You should use HTTP Agent, once you can bind it to your Zabbix Agent interface, so your agent works like a "tunnel".
              https://www.zabbix.com/documentation...itemtypes/http
              hiii
              HTTP Agent works from server or from proxy.
              In case of web check from agent you need to use items like web.page.get.
              Last edited by faaramin; 20-04-2019, 10:40.

              Comment


                #9
                Hey guys, I'm sorry, you're right. All my HTTP checks use my local network. I thought I was using it through a host to get to other network, but I wasn't, I was using web.page.get.

                Comment


                  #10
                  Originally posted by Sajad View Post
                  Hi All
                  I have a monitoring scenario that I want to monitors some HTTP URLs that are in a LAN and send the results to the Zabbix server on the Internet. Zabbix can be used for monitoring HTTP URLs without using agents, then the main server is to monitor the HTTP URLs directly in web monitoring scenarios and the URLs should be visible for the Zabbix server. But in my scenario the HTTP services are behind the NAT then I should use 'Zabbix active agents' to monitor them.
                  I couldn't Find any item in Zabbix agents for this purpose. Does anyone know that how should I do this task?
                  Zabbix web checks are performed from zabbix server or proxy only.
                  http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                  https://kloczek.wordpress.com/
                  zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                  My zabbix templates https://github.com/kloczek/zabbix-templates

                  Comment


                    #11
                    Originally posted by kloczek View Post
                    Zabbix web checks are performed from zabbix server or proxy only.
                    Thank You that's right. At the end I did this steps:
                    1- configured a Zabbix-Proxy in my local network
                    2- set the proxy address as the active-server address in my agents in the LAN (It doesn't need to set public IP address for the proxy, and proxy can access to the server just like active agents)
                    3- configured proxy in the zabbix back-office
                    4- Configured web my scenario on the agent that is behind proxy

                    After that I see that the HTTP checks are performed by the proxy and the result is OK.
                    In my opinion, it was better that zabbix agents could check HTTP URLs too.
                    Thank you @brunohl

                    Comment


                      #12
                      After that I see that the HTTP checks are performed by the proxy and the result is OK.
                      In my opinion, it was better that zabbix agents could check HTTP URLs too.
                      Thank you @brunohl
                      Yeah, but I guess that's when you use web.page.get

                      Comment

                      Announcement

                      Collapse
                      No announcement yet.
                      Working...
                      X