Active agents

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.

Getting ready

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.

How to do it ...

  1. The first thing we do is make sure that our agent has the proper configuration setup to work as an active agent. Make sure that in the zabbix_agentd.conf file the ServerActive option is set and points to the Zabbix server.
  2. Make sure that our server can be reached on port 10051. Verify that the port is open in the firewall!
  3. Next in the agent configuration file we need to set the hostname; this name must be unique and must be set exactly the same as in host configuration on the server. This can be found under Configuration | Hosts.
  4. Restart the zabbix_agent option (service zabbix-agent restart for Red Hat 7 users this is systemctl restart zabbix-agent.service).
  5. Check the agent log in tail -f /var/log/zabbix/zabbix_agentd.log for errors.
  6. You are now ready to add an active item on your host. Go to Configuration | Hosts | Items | Create item.
    How to do it ...

How it works

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.

How it works

There's more

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).

See also

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset