How to Install Zabbix Agent on Linux and Windows

Picture of Ayub Huruse
Ayub Huruse
IT Specialist
Graphic of Zabbix Agent integration with Nagios.

The Zabbix Agent efficiently collects system metrics from Linux and Windows hosts and forwards them to Nagios XI using the Zabbix Agent Wizard. Follow the steps below to install on CentOS 9 (Linux) and Windows Server 2019/2022.

Prerequisites

  • Linux: root or sudo access
  • Windows Server 2019/2022: local administrator
  • Internet connectivity
  • Zabbix server/proxy IP (e.g., 192.168.1.100)

Part 1: Install Zabbix Agent on Linux

1. Update system.

sudo dnf update -y

2. Add Zabbix repository.

Choose your distribution/version here: Zabbix Linux downloads.

sudo rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rhel/9/x86_64/zabbix-release-7.0 1.el9.noarch.rpm 
sudo dnf clean all

3. Install agent.

sudo dnf install -y zabbix-agent2

4. Configure agent.
Edit /etc/zabbix/zabbix_agent2.conf and set:

Server=192.168.1.100 
ServerActive=192.168.1.100 
Hostname=LinuxServer01

5. Start and enable service.

sudo systemctl enable --now zabbix-agent2

6. Open firewall.

sudo firewall-cmd --add-port=10050/tcp --permanent 
sudo firewall-cmd --reload

Part 2: Install Zabbix Agent on Windows

1. Download agent.

2. Run installer.

Zabbix downloads page.
Welcome page.
  • Double-click the downloaded .exe to launch the Wizard
  • Click Next to continue

3. Accept License Agreement.

Zabbix user agreement.
License Agreement.

4. Choose installation folder.

Zabbix installation.
Custom setup location.

5. Configure during setup.

  • Server IP: 192.168.1.100
  • Active checks: 192.168.1.100
  • Hostname: WindowsServer01
  • Enable the check box for Add agent location to the PATH
  • Click Install, then Finish
Zabbix configuration setup.
Configuration setup.

6. Verify service.

sc query "Zabbix Agent 2"

7. Allow firewall.

  • Open Windows Defender Firewall → Inbound Rules → New Rule → Port → TCP 10050 → Allow → All profiles → Name: Zabbix Agent 2

Verification & Troubleshooting

CheckCommand / Location
Linux agent statussudo systemctl status zabbix-agent2
Windows agent servicesc query "Zabbix Agent 2"
Linux firewall portssudo firewall-cmd --list-ports
Windows firewall ruleCheck Inbound Rule for TCP 10050 in Windows Defender Firewall
Agent logs (Windows)C:\Program Files\Zabbix Agent 2\zabbix_agent2.log
Connectivity issuesEnsure Server IP and Hostname match in config and firewall allows TCP/10050

You’re all set! Your system is now ready to be monitored with Nagios XI. To learn more about the Zabbix Agent Wizard, take a look at this article: How to Use the Zabbix Agent Wizard in Nagios XI.

Share: