This guide will provide you with the necessary steps to install and utilize Zabbix Agent 2 for data collection and transmission to your proxy in an offline environment.
To start, it's important to understand why Ansible is a valuable tool for server configuration management. It can be a difficult and tedious process to manually install and configure servers, which is why Ansible is used to simplify and streamline this process. Additionally, Ansible requires minimal resources, as it only needs to be installed on a single host server and can then be used to manage other servers.
For many reasons of security, we avoid allowing internet servers so that why we will install a zabbix-agent 2 and put it in /tmp.
On host server:
wget https://repo.zabbix.com/zabbix/6.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.2-4%2Bubuntu20.04_all.deb
Now in Ansible directory we will set up a playbook to install the agent in other servers:
We will include a YAML script to facilitate the installation of the Zabbix Agent.
After that we launch this command to start the installation:
To enable the Zabbix Agent to begin collecting information, we need to configure the connection information for the agent and the proxy. The configuration process will be automated using Ansible, so there's no need to worry. The relevant configuration file is located at /etc/zabbix/zabbix_agent2.conf.
Let create a file on the host server and put this configuration and send it to all your clients servers:
And now we will create a new playbook in /etc/Ansible to send this configuration and start the service:
Now that the Zabbix Agent has been successfully installed on all of your client servers, the process is complete.