Monitoring hosts with Zabbix proxy

We have our active and passive Zabbix proxies ready to use, so it’s now time to add some hosts to them. Setting up the Zabbix frontend to monitor hosts with Zabbix proxies works in about the same way as monitoring directly from the Zabbix server. The backend and design change completely though, which I’ll explain in the How it works… section of this recipe.

Getting ready

Make sure you have your lar-book-proxy-passive passive proxy and your lar-book-proxy-active active proxy ready by following all of the previous recipes in this chapter.

You will also need your Zabbix server and at least two hosts to monitor. We will be using lar-book-agent_snmp and lar-book-agent in the example, but any host with an active and passive Zabbix agent will work.

How to do it…

We’ll configure a host on both our active and our passive proxies to show you what the difference is between these two. Let’s start with the passive proxy.

Passive proxy

  1. Let’s start off this recipe by logging in to our Zabbix frontend and navigating to Configuration | Hosts.
  2. Let’s add the host with the passive agent to our passive proxy. In my case, this is the lar-book-agent_snmp host.
  3. Click on the lar-book-agent_snmp host and change the Monitored by proxy field to lar-book-proxy-passive, as in the following screenshot:
    Figure 7.12– Configuration | Hosts, Edit host page for host lar-book-agent_snmp

    Figure 7.12– Configuration | Hosts, Edit host page for host lar-book-agent_snmp

  4. Now, click on the blue Update button. Our host will now be monitored by the Zabbix proxy.

Active proxy

  1. Let’s do the same for our other lar-book-agent host by navigating back to Configuration | Hosts.
  2. Click on the lar-book-agent host and edit the Monitored by proxy field to lar-book-proxy-active, as in the following screenshot:
    Figure 7.13 – Configuration | Hosts, Edit host page for host lar-book-agent

    Figure 7.13 – Configuration | Hosts, Edit host page for host lar-book-agent

  3. Now, click on the blue Update button. Our host will now be monitored by the Zabbix proxy. This might take up to 1 hour though.

How it works…

Monitoring hosts with a Zabbix proxy in passive or active mode works in the same way from the frontend. We merely configure in our frontend which host is monitored by which proxy, and it will be done.

Let’s take a look at how our Simple Network Management Protocol (SNMP) agent is now monitored by the passive proxy:

Figure 7.14 – A completely passive Zabbix setup with proxy

Figure 7.14 – A completely passive Zabbix setup with proxy

Our passive Zabbix proxy now collects data from our SNMP agent, and after this is collected, Zabbix server collects this data from our Zabbix proxy. Sounds like a whole process already, right?

Let’s look at our active Zabbix proxy setup:

Figure 7.15 – A completely active Zabbix setup with proxy

Figure 7.15 – A completely active Zabbix setup with proxy

Our active Zabbix proxy receives data from our active Zabbix agent and then sends this data to our Zabbix server. We’ve eliminated all the timers in this proxy setup altogether and are now receiving all of our data at the Zabbix server as soon as it’s available.

This is why I would always recommend working with active proxies—and even active agents—as much as possible. If we look at the following screenshot, we can see a setup that you might see at a company:

Figure 7.16 – An active Zabbix proxy setup with different monitored types

Figure 7.16 – An active Zabbix proxy setup with different monitored types

Fortunately, we have the option of using a lot of different combinations of setups. It is perfectly possible—and even logical—to combine your checks from a proxy, just as much as it would be with Zabbix server. We can monitor all types from our proxy, whether it’s a Zabbix agent, SNMP, or even Java Management Extensions (JMX) and the Intelligent Platform Management Interface (IPMI).

Tip

When designing a new Zabbix hosting infrastructure, start with adding proxies if possible. This way, you don’t have to change a lot later. It’s easy to add and change proxies, but it’s harder to go from just using Zabbix server to using Zabbix proxies in your design.

Related Articles

How to add swap space on Ubuntu 21.04 Operating System

How to add swap space on Ubuntu 21.04 Operating System

The swap space is a unique space on the disk that is used by the system when Physical RAM is full. When a Linux machine runout the RAM it use swap space to move inactive pages from RAM. Swap space can be created into Linux system in two ways, one we can create a...

read more

Lorem ipsum dolor sit amet consectetur

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

four × five =