Monitoring hosts through a proxy

After setting up a proxy, we want to add some hosts to our proxy. In this recipe, we will show you how to link your hosts to the installed proxies.

Getting ready

For this recipe, we need our Zabbix server with an active or passive proxy configured like we have done in one of the previous recipes. We also need a host that we can use to connect to our proxy.

How to do it…

Adding a host to a proxy is a very straightforward method and doesn't take much time:

  1. First we have to change the Server and/or ActiveServer values in the configuration of our Zabbix client. This can be done in the zabbix_agentd.conf configuration file. Instead of the Zabbix server's IP we add the IP of our proxy.
  2. Restart the agent:
    service zabbix-proxy restart
    
  3. In the Zabbix server, go to the agent in the menu Configuration | Hosts. Select the correct host and at the bottom of the host page, select from Monitored by proxy the correct proxy from the list.
  4. Now, go to Administration | Proxies. You will see that the Host count and Item count has increased.
    How to do it…

The proxy will also show the number of items and the required Virtual Private Server (VPS).

How it works…

As we have seen in our schemas, once a proxy is in place, the host(s) will only communicate with the proxy once the host is configured correctly. From that moment, the proxy will act as Zabbix server so everything that was done from the Zabbix server will be done from the proxy from now on. So if we want to monitor for example, IPMI, we will have to install the correct libraries on our proxy. If we want to run external scripts, then we need to install them on the proxy instead of the Zabbix server.

There's more…

Triggers are always evaluated by Zabbix server. The proxy will only collect the data and give it to the Zabbix server. It is very important once you set up proxies that you make use of the NTP server so that the time between Zabbix server, proxies, and hosts is always OK!

Don't forget that the ProxyConfigFrequency=3600 option is standard. That means, that if you change something on the proxy, the proxy will only be notified of those changes after 3600 seconds. The next command example will reload the configuration cache so that the active proxy will ask the server for the latest configuration:

zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf -R config_cache_reload
..................Content has been hidden....................

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