Summary
This time, we created a new host and added several normal or passive agent items and active agent items.
We learned that it is good practice to disable active items if they are not used by commenting out the ServerActive
parameter. If passive items are not used, they can be disabled by setting StartAgents
to 0
, although leaving them enabled can help with testing and debugging.
We set up simple checks on two different hosts and explored many tricks and mechanisms to ease managing in the frontend, such as item cloning, copying, and value mapping.
It might be worth remembering how connections are made for active and passive Zabbix agent item types—that's important when you have to decide on monitoring mechanisms based on existing network topology and configuration.
Let's look at the following diagram, summarizing those connections. The arrow direction denotes how connections are made:
Discussing benefits and drawbacks, we found that active items are recommended over passive items in most cases.
Listed here are the default ports that can be changed if necessary:
- Normal or passive items: The Zabbix server connects to a Zabbix agent, which in turn gathers the data
- Active items: The Zabbix agent connects to a Zabbix server, retrieves a list of things to monitor, gathers the data, and then periodically reports back to the server
- Simple checks: The Zabbix server directly queries the exposed network interfaces of the monitored host; no agent is required
The simple checks were different: they never used the Zabbix agent and were performed directly from the Zabbix server. Simple checks included TCP port checking.
This covers the two basic, most commonly used check types: a Zabbix agent with bidirectional connection support and simple checks that are performed directly from the server.
In the next chapter, we will look at SNMP monitoring. We'll start with a quick introduction to the Net-SNMP tools and basic Management Information Base (MIB) management and will set up SNMP polling with fixed and dynamic OIDs. We will also receive SNMP traps and map them to hosts and items both using the built-in method and a very custom approach.