In the first part of this series, we set up a Zabbix server based on a MySQL database with an associated front end. Now you'll learn how to start the Zabbix agent and register servers with Zabbix to monitor them.
article is part two in a three part series. For part one, click here. For part three, click here.
If the installation was successful, you can connect to the Zabbix webpage at http://your-zabbix-host/zabbix. To log in, use the username admin and password zabbix. This gives you access to the Zabbix interface shown below.
Zabbix may be working, but it is not monitoring anything. Let's start monitoring at least one host in your network environment. Setting up the first host is easy. After applying steps from the first part of this article, the Zabbix server will be listed as a host. To verify this, select Configuration > Hosts.
In the host overview, you can see that the Zabbix server is not monitored. To change this, click the Not Monitored link that you see under the Status column. This will change the host status and send the update to the Zabbix system. You now have a monitored host.
For every host in your Zabbix system, there are many items that you can monitor. To see them, click the Items link, which shows all items that are relevant for the operating system running on the monitored host. You can also see some items have a trigger. By using these, an alert will display in the Zabbix environment if a critical threshold has been reached.
To make host monitoring in your Zabbix environment easier, work with host groups. To do this, select Configuration>Hosts and select your monitored host. Next, click the link for the name of this host and add it to a host group. By default, it will be added to the group of Zabbix servers, but you might want to see it in the Linux servers group as well. Back to the main Monitoring window, you can see a summary of all relevant parameters for the host group.
Now that you have a monitored Linux host, let's have a look at how to add a Windows system to the Zabbix environment. You'll need to add a Zabbix agent on the Windows system. You can find this agent on the Zabbix download page. Get the compressed file and extract it to a location where you can access it at a later stage.
Before running the zabbix_agentd.exe file, you need to create a configuration file with the name zabbix_agentd.conf. Create this file in the directory C:\Program Files\zabbix\zabbix_agent.conf and make sure it has the following contents:
Next, right-click the zabbix_agentd.exe file from the zabbix_agents directory you created after downloading the Zabbix agent for Windows. Select the file properties and on the Compatibility tab, make sure that the Run as Administrator option is selected. After doing this, you can open a command window in Windows and run the following command:
zabbix_agentd.exe --config "C:\Program Files\zabbix\zabbix_agentd.conf" --install
Now use zabbix_agentd.exe --start to start the Zabbix agent or just start it from the Windows control panel.
Before you can monitor the host from Zabbix, you need to add it in the Zabbix management interface. To do this, select Configuration>Hosts and click Create Hosts. The most important part of the host definition is its name; it should match the name you specified in the zabbix_agentd.conf file. Also, make sure to specify the IP address where the host can be found. After doing that, click Save to save the host to the management interface.
At this point you should see the Windows host in the Zabbix monitoring interface as well, and you can really start monitoring your network environment.
ABOUT THE AUTHOR:
Sander van Vugt is an independent trainer and consultant based in the Netherlands. He is an expert in Linux high availability, virtualization and performance, and has completed several projects that implement all three. He is also the writer of various Linux-related books, such as Beginning the Linux Command Line, Beginning Ubuntu Server Administration and ;Pro Ubuntu Server Administration.
This was first published in February 2013