Ad Widget

Collapse

Zabbix proxy not monitoring host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • slyper
    Junior Member
    • Jun 2022
    • 12

    #1

    Zabbix proxy not monitoring host

    Hey,

    I have a simple setup:
    - host A (10.10.10.1) running zabbix server mysql (4.0.41-1.el7)
    - host B (10.10.10.2) running zabbix proxy sqlite3 (4.0.39-1.el7) and agent (4.0.39-1.el7).

    I configured the proxy with these settings:
    Code:
    ProxyMode=1
    Server=10.10.10.1
    Hostname=ZabbixProxy
    DBName=/tmp/zabbix_proxy.sqlite3
    and the agent:
    Code:
    Server=127.0.0.1,10.10.10.1,10.10.10.2
    Hostname=ZabbixAgent
    In the web interface of the zabbix server, I configured the zabbix proxy (passive mode) with Host name ZabbixProxy and IP 10.10.10.2.
    The web page indicates it's reported to be seen every 5 seconds or so.
    I added the same machine ZabbixAgent-10.10.10.2 as a host, monitored by the ZabbixProxy.

    Note that the setup is currently completely in passive mode (both the agent and the proxy).
    My problem is: the ZabbixAgent data is not collected, the host is not monitored.

    I debugged my setup this way:
    - the port 10.10.10.2:10051 is reachable from the server host.
    - the port 10.10.10.2:10050 is reachable from the proxy host (it's on the same machine)
    - zabbix_get -s 10.10.10.2 -k agent.ping returns 1 executed the server
    - zabbix_get -s 10.10.10.2 -k agent.ping returns 1 executed on the proxy
    - after both the server and the proxy are restarted, no other log statements get written, after the startup process (agents getting started etc.)
    - I see a lot of traffic between 10.10.10.1 and 10.10.10.2 on port 10051 (about every second)
    - I don't see any traffic on the localhost:10050 on the proxy/agent host

    When I switch the monitored host to monitored by zabbix server (no proxy), all the data comes in as expected.
    I don't see how I can debug this further. Any ideas why the proxy is not executing the passive checks?

    regards,

    slyper

    PS: We're planning on migrating to zabbix 6.0 in the near future.
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    You could try increasing the logging level in the proxy to see what does it do.

    Markku

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      after both the server and the proxy are restarted, no other log statements get written, after the startup process (agents getting started etc.)
      You should see at least something like
      Code:
      13980:20220609:095305.768 received configuration data from server at "<server IP>", datalen <some number>
      That would indicate, that proxy received instructions from server and then starts to act... How long is your "ProxyConfigFrequency" in server conf? Maybe it has not yet pushed data to proxy?

      Comment

      • slyper
        Junior Member
        • Jun 2022
        • 12

        #4
        As suggested by Markku, I changed my proxy log level from the default (3) to highest (5) and pasted it here: https://pastebin.com/RLGtPXwx
        As suggested by cyber, I checked the ProxyConfigFrequency in the server conf. It was on 3600, so I changed it to 60 and restarted the server and the proxy.
        Waited several minutes, but no line stating received configuration data from server.

        So, the host configuration is never received by the proxy.
        I see some failure lines in the logs, but other than that, I can't see what's going wrong.
        Code:
        End of get_host_availability_data():FAIL
        Any suggestions on what I can do next?

        Comment

        • Markku
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Sep 2018
          • 1781

          #5
          Yeah, I don't know what the failure means.

          There are "trapper got '{"request":"proxy data"}'" messages that mean that Zabbix server successfully requests data from the proxy (see https://www.zabbix.com/documentation...#proxy-request), but there are no proxy config requests (https://www.zabbix.com/documentation...config-request). Strange because you said that you changed the ProxyConfigFrequency value to one minute, restarted the server and waited several minutes. The log was just over one minute in length so it should have appeared there.

          Are you sure that the correct Zabbix proxy was selected for the monitored host (ZabbixAgent) at the time of the debug log?

          Markku

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            Ok this is proxy log, but anything in servers log?

            Comment

            • slyper
              Junior Member
              • Jun 2022
              • 12

              #7
              The agent is monitored by proxy, as mentioned:
              Click image for larger version

Name:	Screenshot from 2022-06-09 14-10-02.png
Views:	926
Size:	39.6 KB
ID:	445906

              Click image for larger version

Name:	Screenshot from 2022-06-09 14-10-43.png
Views:	925
Size:	17.8 KB
ID:	445907

              The server logs do say something about not being able to send the configuration:
              Code:
              16233:20220609:141226.968 sending configuration data to proxy "ZabbixProxy" at "10.10.10.2", datalen 11285
              16233:20220609:141230.968 cannot send configuration data to proxy "ZabbixProxy" at "10.10.10.2": empty string received
              I added debug logging on the server to see if there's more info about this (but our server is monitoring a whole lot of other hosts, so this might be a lot of data).

              Comment

              • slyper
                Junior Member
                • Jun 2022
                • 12

                #8
                I saw this thread: https://www.zabbix.com/forum/zabbix-...assive-proxies
                There's a minor version mismatch, I'm going to try to make sure both server and proxy have the exact same version, later today.
                Any other hints are definitely welcome, and thanks for your help so far!

                Comment

                • slyper
                  Junior Member
                  • Jun 2022
                  • 12

                  #9
                  updated the proxy and agent to 4.0.41-1.el7, but I still get the same log output:
                  Code:
                  18645:20220609:151826.138 sending configuration data to proxy "ZabbixProxy" at "10.10.10.2", datalen 11285
                  18645:20220609:151830.140 cannot send configuration data to proxy "ZabbixProxy" at "10.10.10.2": empty string received
                  Last edited by slyper; 09-06-2022, 15:25.

                  Comment

                  Working...