How to Install Zabbix Agent and add Windows Host to Zabbix Monitoring
Following previous tutorials concerning the Zabbix series, this article describes how to install and set up an instance of a Zabbix agent to run as a service on Microsoft Windows systems in order to monitor your infrastructure windows environments, especially server machines.
Requirements
You must already have a running Zabbix monitoring appliance, if not, you can find more instructions here:
or for Linux Users:
Step 1: Download and Install Zabbix Agent on Windows
1. The pre-compiled msi agents for Windows environments can be obtained from the official Zabbix download page and manually installed and started on the system.
2. Once the Zabbix agent MSI file has been downloaded on your system, run it and supply the required information in order to configure and install the agent on the target monitored host as it follows:
Hostname: use the FQDN of your windows host (the hostname value should match the “Full Computer name” configured for your machine)
Zabbix server Name: use the IP of the Zabbix Server
Agent Port: 10050
Add agent location to the Path: check this one
3. After you’ve finished the setup, open Windows Command Prompt with Administrator privileges, run services.msc command in order to open Windows Services utility, and locate Zabbix Agent service to check if the service is running and automatically started after reboot.
services.msc
From this console, you can manage the service (start, stop, pause, resume, enable or disable).
Step 2: Configure Windows Firewall and Test Zabbix Agent
1. Almost all Windows-based systems have Windows Firewall active and running, therefore Zabbix agent port must be opened in the firewall in order to communicate with the Zabbix server.
In order to open the Zabbix agent port in the windows firewall, hit Windows Firewall in the search, after that click on Firewall- & Network Protection and finally on Allow access from app through firewall. (my System is in German but it does not matter)
2. In order to test if the Zabbix agent running on windows is reachable from the Zabbix server-side, use telnet or netcat command on Zabbix server against windows agent IP-Port and a Connected message should appear. Hit Enter key to generate an error message and automatically disconnect from the agent:
telnet <Windows_agent IP Address> 10050
Step 3: Add Zabbix Agent Monitored Windows Host to Zabbix Server
1. Once the windows agent has been tested from the command line and everything looks fine, go to Zabbix Server web interface, move to Configuration tab -> Hosts, and hit on Create Host button in order to add the Windows monitored host.
2. On the Host window add the FQDN of your windows agent machine in Hostname filed, add an arbitrary name to Visible name filed in order to easily identify the monitored machine on Zabbix panel, make sure the host is included in a Group Servers (in my Case, I created a new Host Group named “Windows servers”, and add the IP Address of your windows host in Agent interfaces filed. The Port value leaves it unchanged.
4. Next, go to the Template tab and hit on Select button. A new window with Zabbix Templates should appear. Navigate through this window, check Template Windows by Zabbix agent, and hit on Select button to add the template.
Finally, after the Template Windows by Zabbix agent is visible in Linked Templates filed hit on the below Add button to complete the process and add the entire Windows host configuration.
After your monitored windows machine has been added return to Configuration -> Hosts and the windows Host should now be present in this window as illustrated below screenshot.
That’s all! Just assure that your windows host Status is set to Enabled and wait a few minutes in order for the Zabbix server to contact the windows agent side and process the received remote data.
As an example, to get a graphical inside of the CPU load on the monitored Windows machine go to Zabbix web console Monitoring tab -> Graphs, select the windows machine host name and CPU load Graph and all the collected data so far should be presented into a nice graphical chart.
If you have any questions please leave it in the comment sections below. 🙂
[…] How to Install Zabbix Agent and add Windows Host to Zabbix Monitoring […]