Installing and Configuring Zabbix Agent for Remote Monitoring
Zabbix is a powerful open-source monitoring tool that enables businesses to track their IT infrastructure’s health, performance, and availability. Installing the Zabbix agent is a key step in monitoring remote systems. In this guide, we will walk you through the process of installing and configuring the Zabbix agent on both Linux and Windows servers. Additionally, we’ll discuss how to secure your connection with pre-shared keys and integrate it smoothly into your monitoring setup.

Steps to Install Zabbix Agent on Linux
- Install the Zabbix Repository
Begin by logging into the remote machine you want to monitor. Download the repository configuration file with this command:wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb - Install the Zabbix Repository File
After downloading the file, install it with the following command:sudo dpkg -i zabbix*all.deb - Install the Zabbix Agent
Update your package list and install the Zabbix agent with these commands:sudo apt-get update sudo apt-get install zabbix-agent
Configuring the Zabbix Agent
- Generate Pre-shared Key
For secure communication between the Zabbix agent and server, generate a pre-shared key using OpenSSL:sudo sh -c "openssl rand -hex 32 > /etc/zabbix/zabbix_agentd.psk" cat /etc/zabbix/zabbix_agentd.psk - Edit the Zabbix Agent Configuration
Open the Zabbix agent configuration file with the following command:sudo vi /etc/zabbix/zabbix_agentd.conf- Change the
Serverparameter to the IP address of your Zabbix server (e.g.,Server=ZABBIX_MONITOR). - Scroll to the
TLSConnectsection and update it topskfor secure communication. - In the
TLSPSKIdentitysection, enter a unique identifier likePSK 001. - Point the
TLSPSKFileto the generated pre-shared key file:
TLSConnect=psk TLSPSKIdentity=PSK 001 TLSPSKFile=/etc/zabbix/zabbix_agentd.psk - Change the
- Restart the Zabbix Agent
After making the necessary changes, restart and enable the Zabbix agent:systemctl start zabbix-agent systemctl enable zabbix-agent
Adding Hosts to the Zabbix Monitor
To add a remote server as a monitored host in Zabbix, follow these steps:
- Log in to your Zabbix server and go to Configuration > Hosts.
- Click the Create Host button and provide the relevant hostname and IP address for your remote server.
- Add the host to a group (e.g., Linux Servers).
- Under the Templates tab, search for Template OS Linux and add it.
- In the Encryption tab, select PSK for both the Connections to Host and Connections from Host sections. Then, enter the pre-shared key (
PSK 001). - Click Add or Update to finalize the host setup.
Once everything is correctly configured, the remote host should appear with a green status, indicating that the connection is secure and the agent is sending data to the server.
Installing Zabbix Agent on Windows
To monitor Windows servers with Zabbix, follow these steps:
- Download the Zabbix Agent for Windows
Visit the official Zabbix website to download the Zabbix agent for Windows. Save it to your Downloads folder. - Configure the Zabbix Agent
Open thezabbix_agentd.conffile and modify the following parameters:Server= ServerActive= Hostname= - Install and Start the Zabbix Agent
Run the following commands from the Windows command prompt (with administrator privileges):C:\Users\windows\Downloads\bin\zabbix_agentd.exe --config C:\Users\windows\Downloads\bin\zabbix_agentd.exe --start - Verify the Agent is Running
Go to Windows Services and ensure the Zabbix agent is running.
Configuring Windows Firewall for Zabbix Agent
By default, the Windows firewall may block incoming and outgoing connections required for Zabbix. To allow communication:
- Allow ICMP protocol for network communication:
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol="icmpv4:8,any" dir=in action=allow - Open the default Zabbix port (10050) on the firewall:
netsh advfirewall firewall add rule name="Open Port 10050" dir=in action=allow protocol=TCP localport=10050
Adding a Windows Host to the Zabbix Server
- On your Zabbix server, navigate to Configuration > Hosts and click Create Host.
- Provide the necessary details for your Windows host, such as hostname, visible name, and IP address.
- Under the Templates tab, search for Template OS Windows by Zabbix agent and select it.
- The Windows host should now be listed with a green ZBX icon, indicating that it’s properly monitored.
To graph system metrics like CPU, memory, disk usage, and network statistics, go to Monitoring > Hosts, select the Windows host, and click Graphs.
ZippyOPS: Enhancing Your Infrastructure Monitoring
While setting up Zabbix provides robust monitoring capabilities, consider optimizing your DevOps and IT operations with ZippyOPS. ZippyOPS offers consulting, implementation, and managed services to streamline infrastructure management and security. Whether you’re implementing DevOps, DevSecOps, DataOps, or AIOps, ZippyOPS has the expertise to ensure seamless performance.
Explore ZippyOPS solutions for automating workflows, enhancing security, and deploying microservices at scale. You can also leverage cloud solutions and MLOps to further enhance your monitoring and operational efficiency. Learn more about our services on the ZippyOPS website or discover our products.
For a personalized consultation, reach out to us at sales@zippyops.com.
Conclusion
By following these steps, you can successfully install, configure, and secure the agent on both Linux and Windows servers. With Zabbix in place, you’ll be able to monitor critical system metrics effectively. For businesses looking to take their infrastructure management to the next level, integrating solutions like those offered by ZippyOPS can provide additional support in optimizing your DevOps, cloud, and security strategies.



