Ad Widget

Collapse

Optimal way to set up zabbix agent conf file on hosts - Regards to proxies

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rossmuron
    Junior Member
    • Aug 2025
    • 2

    #1

    Optimal way to set up zabbix agent conf file on hosts - Regards to proxies

    Hey There!

    I've been having a pickle of a dilly understanding if my current set up is optimal. I'm using zabbix 7.4 and monitoring windows servers with active checks primarily.

    I have the following servers set up [zabbix postgres db] <- [zabbix server] <- [4 zabbix proxies]
    There are 2 sets of 2 zabbix proxies, each proxy group (set up in the front end) is for a specific hosting region.

    Initially, my agent config file looked like this:
    SERVER=<ip of zabbix server and proxies separated by commas>
    SERVERACTIVE=<ip of zabbix server and proxies separated by semicolons>

    After noticing a ton of noise in the logs, I separated into 2 agent deployments for regions, and now my agent config looks like this
    SERVER=<IP of zabbix Server, IP of regionXproxy1, IP of regionXproxy2>
    SERVERACTIVE=<IP of regionXproxy1>

    It's my understanding that the server field should have the main zabbix server and both proxies, because it needs to "reach" the main zabbix server for load balancing, and the proxy servers in case i add some passive checks (i probably wont).
    It's also my less solid understanding that I only need to place one proxy in the server active field, and that the zabbix server itself will "load balance" the host based off its auto registered proxy group into a specific proxy.


    My main question is if this set up is acceptable for a somewhat large (1800 host) environment (may need to add proxies eventually but load is fine for now.) I notice in the agent logs lots of passive checks being attempted by the zabbix server itself, but I'm thinking those might be some automatic discovery actions I put in place in the front end. I would say that largely, this set up is working. But so was the initial set up and it was only after I started scouring logs that I noticed tons and tons of failed connections. I still see some but they are much more toned down. In such a large environment if i can minimize traffic I would like to do so. Would appreciate any advice, thanks in advance!
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    The basic rule is (when using proxies) that you only mention the proxy addresses in the agent configurations. That's because server does not communicate directly with the agents anymore when proxy is configured in the host settings.

    With proxy groups, optimally you should configure the agents with all the proxy addresses from the correct proxy groups (separated by semicolons in ServerActive), not the addresses of any other proxies. That said, for ServerActive directive, it also works if you put just the server or some of the (correct) proxies there because there is a redirection mechanism in the active agent protocol within the proxy group. But, your agent (monitored by the proxy group) might not have even connectivity with the Zabbix server, or if you put just one proxy address there and that proxy is not up, then there will obviously not be working communication. So again, just put the correct proxy addresses in the agents' ServerActive and you are covered.

    If you don't have passive agent items, you don't have to set the Server directive in the agent to any specific value (with legacy agent you can even set StartAgents to 0, or with agent 2 you can set Server to empty value; both will eliminate the 10050/tcp port from listening). If you have passive agent items or otherwise need to enable the incoming 10050/tcp connections to the agents, then you need to set Server directive to those addresses that will initiate the connections to the agent (usually the addresses of the proxies in the correct proxy group).

    Markku

    Comment

    Working...