Zabbix Installation
Zabbix Installation
Zabbix is an open source and enterprise-class network monitoring tool that can be used to
monitor performance and availability of the server, network devices and other network
components. Zabbix uses MySQL, PostgreSQL and Oracle to store its data. Zabbix also provides a
user friendly web interface to monitor and track data and settings. Zabbix uses a Zabbix agent to
collect the data and send it to the Zabbix server.
In this tutorial, we will go through step by step installation of Zabbix server and Zabbix client on
Ubuntu 16.04 server.
Prerequisites
• A fresh Alibaba Cloud ECS instance for Zabbix server with Ubuntu 16.04 installed.
• A fresh Alibaba Cloud ECS instance for Zabbix client with Ubuntu 16.04 installed.
• Non-root user with sudo privileges is configured on both instance.
Before starting, Zabbix requires Apache, MySQL and PHP installed on your system. First, install
Apache, PHP7 and other required PHP modules by running the following command:
Once all the components are installed, you will need to install MariaDB. By default, the latest
version of the MariaDB is available in Ubuntu 16.04 repository. So you can easily install it by just
running the following command.
Install Zabbix
By default, the latest version of the Zabbix is not available in Ubuntu 16.04 default repository. So
you will need to download and install the official Zabbix repository to your system.
Next, update the repository and install Zabbix server and web front-end with MySQL database
support with the following command:
You will also need to install Zabbix agent to collect the Zabbix server data itself.
Before using Zabbix, you will need to create a database and a user to store the Zabbix server data.
mysql -u root -p
Enter your root password when prompt, then create a database for Zabbix.
Next, create a user for the Zabbix server and grant all the privileges identified by a password:
Next, import initial schema and data to the newly created Zabbix database:
cd /usr/share/doc/zabbix-server-mysql/
sudo zcat create.sql.gz | mysql -u zabbix_user -p zabbix_db
Enter your zabbix_user password when prompt. (You may have to wait)
Configure Zabbix
Next, you will need to set database, database username and the database password in the Zabbix
server configuration file. You can do this by editing zabbix_server.conf file:
DBName=zabbix_db
DBUser=zabbix_user
DBPassword=zabbix
Save and close the file when you are finished. Next, you will need to change Timezone settings
in /etc/zabbix/apache.conf file:
Finally, start Apache server and Zabbix server and enable them to start on boot time:
Click on the Next step button, you should see the pre-requisites page in the following screen:
Make sure all the values are ok. Once you have done. Click on the Next step button. You should
see the Zabbix database configuration screen:
Here, update all the details like, Database name, Database username and the password, then click
on the Next step button. You should see the following screen:
Here, provide hostname or IP address and port number of the zabbix server and click on the Next
step. You should see the following page:
Verify the pre-installation summary, then click on the Next step button to start the installation.
Once the installation is finished, you should see the following page:
Now, click on the Finish button. You will be redirected to the Zabbix server login screen as below:
Now, log in with the Zabbix server default username Admin and the password zabbix. You should
see the Zabbix server dashboard in the following screen:
Your Zabbix server is now up and running. Next, you will need to install Zabbix Agent which you
want to monitor. First, download and install the Zabbix repository to your Client machine:
wget http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.0-
2+xenial_all.deb
Next, open the Zabbix agent default configuration file located at /etc/zabbix/zabbix_agentd.conf:
Save and close the file when you are finished, then restart Zabbix Agent to apply these changes:
Now, Zabbix Agent is up and running. Next, move to the Zabbix server web interface and add the
Client Machine which run zabbix agents in order to be monitored by the Zabbix server.
On the Zabbix web console, go to Configuration -> Hosts -> Create Host -> Host tab and
provide all the required information as shown below:
Next, move to Templates tab and click on the select button. A new window with templates should
open. Choose Template OS Linux then scroll down and click on the Select button to add it.
Next, click on add button to link it to Zabbix server, then click on lower add button again to
complete the process:
You should now see the monitored client machine in below screenshot:
After adding the Zabbix client to the Zabbix server make sure that the host Status is set to Enabled.
Next, wait for the few seconds for Zabbix server to contact the agent, then move to the Monitoring
tab on Zabbix web console and then click on the Latest data to see the data from your agent.