We talked about active and passive agent configurations. In this topic, we will explain a bit more in depth the active agent setup in Zabbix. Remember when we create items in Zabbix, we can create Zabbix items as passive and active.
You will need a Zabbix server and you must have the software for the agent installed on the machine that you would like to monitor. This can be the Zabbix server or another machine. The agent needs no configuration. We will explain you how to go about the same in this recipe.
zabbix_agentd.conf
file the ServerActive
option is set and points to the Zabbix server.zabbix_agent
option (service zabbix-agent restart
for Red Hat 7 users this is systemctl restart zabbix-agent.service
).-f /var/log/zabbix/zabbix_agentd.log
for errors.The active agent will initiate the communication with the Zabbix server and pull out a list of items it has to check from the server.
The agent knows from the ServerActive
parameter in the zabbix_agentd.conf
file, what servers it has to contact. The option RefreshActiveChecks
is the parameter that will control how many times the agent has to ask for this list. The standard value is 120 seconds. This means, that if we change something in our Zabbix configuration in an active item, it can take up to 2 minutes before our active agent will be aware of the change and 1 minute extra for the Zabbix server to refresh its cache. (CacheUpdateFrequency
)
The active agent also has the advantage of having a buffer. The standard value that data is kept is 5 seconds but can be increased up to 1 hour with the BufferSend
parameter.
When we make use of the active agent, it is possible to send our checks to more than only one server or proxy. We can do this by adding a list of comma-separated IP addresses to the option ServerActive
in our agent config
file.
If you configure the agent as an active agent, then it's best to not fill in the Server
option in the agent configuration file as this is for the passive agent. (Be careful with this, as Server
and ServerActive
are two different options in the configuration file).
https://www.zabbix.com/documentation/2.4/manual/appendix/items/activepassive