Ad Widget

Collapse

Zabbix proxy - do I need reinstall agents on all host?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cnapan
    Junior Member
    • Jun 2020
    • 12

    #1

    Zabbix proxy - do I need reinstall agents on all host?

    Hello, I am haveing trouble to understand how the proxy for zabbix works.
    At the begginnig I had only a single master zabbix server and all hosts were monitored by that server, and I had ZBX icon on green on that host names. Now I decided to have a proxy in one of my location. Proxy is running and talking to Zabbix master. Now some details:
    Zabbix main server has IP 192.168.0.100
    The proxy has IP 192.168.0.120
    When I was installed an agent on all the monitored host, I have just typed 192.168.0.100 in server field, and left default 127.0.0.1 in Servver Active ( proxy) field. Now, in Zabbix page, when I go to configuration host, and I change some hosts to be monitred by Zabbix Proxy, I have no more data coming from that host. The ZBX icon is no green anymore, and host is not monitored. So question is, do I need to on all host that I want to be monitred by proxy, reinstall agent and put 192.168.0.120 as a adress for Active checks ( proxy)?
    Or maybe, I should put 192.168.0.120 in both fields, as server and as proxy? What is the proper method?

    Regards,
    Last edited by cnapan; 30-06-2020, 13:52.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Read the comments in the zabbix_agentd.conf that should have come with your version of Zabbix, specifically the comments above the entry for "Server" (if you use passive checks) and "ServerActive" (if you use active checks).

    Code:
    ##### Passive checks related
    
    ### Option: Server
    # List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers [B]and Zabbix proxies[/B].
    # Incoming connections will be accepted only from [B]the hosts[/B] listed here.
    # If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally
    # and '::/0' will allow any IPv4 or IPv6 address.
    # '0.0.0.0/0' can be used to allow any IPv4 address.
    # [B]Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com[/B]
    You don't need to re-install the agent, you just need to modify the config file so that either the proxy IP address or both the proxy and the server are listed in Server and/or ServerActive, depending on which you use.

    Once you've modified the config file, just restart the agent.

    Comment

    • cnapan
      Junior Member
      • Jun 2020
      • 12

      #3

      You don't need to re-install the agent, you just need to modify the config file so that either the proxy IP address or both the proxy and the server are listed in Server and/or ServerActive, depending on which you use.

      Once you've modified the config file, just restart the agent.
      I understand this. But can
      ​​you tell me, if I set my proxy as passive mode, what IP I need to put in agents config file for Server and Server active? Should it be a proxy IP in both, or master zabbix IP in server and proxy IP in server active? These hosts are monitored by passive checks, if that matter.

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        You may have only read the last part of what I wrote in comment #2, above. Please carefully re-read the first part, and carefully read the comments in the zabbix_agentd.conf file, specifically for Server. Since you're not using active checks, you don't need to do anything with ServerActive, but the comments before that entry would also explain that.

        Comment

        • cnapan
          Junior Member
          • Jun 2020
          • 12

          #5
          Originally posted by tim.mooney
          You may have only read the last part of what I wrote in comment #2, above. Please carefully re-read the first part, and carefully read the comments in the zabbix_agentd.conf file, specifically for Server. Since you're not using active checks, you don't need to do anything with ServerActive, but the comments before that entry would also explain that.
          I have read it, and I set for server: 192.168.0.100, 192.168.0.120
          After reboot the monitored host everything still works, but once I change that host on Zabbix to be monitored by zabbix proxy, then the ZBX availability stastus is greyed out. Is that how it supposed to be? I thought , when I am not using active checks, the ZBX indicator supposed to be active no matter if host is monitored by Zabbix master or proxy. What more, it is not just it is not active, the host is simply not monitored anymore.
          :-(

          Comment

          • tim.mooney
            Senior Member
            • Dec 2012
            • 1427

            #6
            Ok, your settings for Server should be sufficient to allow either your Zabbix server or your Zabbix proxy to connect for passive item checks. As long as you're not using any active item checks, you don't need to set anything for ServerActive.

            Are there any errors in the zabbix_agentd.log on the client that is supposed to be monitored by the proxy?

            Are there any errors in the zabbix proxy log on your proxy?

            Does the client system have a host-based firewall?

            Comment

            • cnapan
              Junior Member
              • Jun 2020
              • 12

              #7
              Thank you, it is working now. The problem was with proxy database, which could not save the configuration obtained from Zabbix master. Droping database and running schema.sql from beginning did not help. I had to set entire Proxy from scratch. Thank you for explanations.

              Comment

              • tim.mooney
                Senior Member
                • Dec 2012
                • 1427

                #8
                You're welcome, and thanks for following up and explaining what the problem turned out to be. That might be helpful for someone else in the future.

                Comment

                Working...