Zabbix is an open source enterprise-class monitoring software for servers, network devices, and applications. Zabbix uses Zabbix Agent installed on monitored hosts to collect the data. Also, it can monitor standard services such as SMTP or HTTP web services without having a client on the monitored host.
Zabbix is released under the GPL license v2.
Zabbix requires at least 128MB of RAM and 256MB of HDD space to start with. However, the amount of disk or memory depends on the number of hosts and parameters are being monitored.
Configure Zabbix repository
Zabbix is not included in Ubuntu repositories. So, to install Zabbix, we will need to set up the Zabbix repository on the system by installing the Zabbix repository configuration package.
### Ubuntu 18.04 ### wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-2+bionic_all.deb sudo dpkg -i zabbix-release_4.0-2+bionic_all.deb ### Ubuntu 16.04 ### wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-2+xenial_all.deb sudo dpkg -i zabbix-release_4.0-2+xenial_all.deb ### Debian 9 ### wget https://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-2+stretch_all.deb sudo dpkg -i zabbix-release_4.0-2+stretch_all.deb
Install Zabbix Server with MySQL
Use the apt command to install Zabbix server (v3.4) along with MySQL Server on your system.
sudo apt update sudo apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-agent
Edit the Zabbix configuration file to update with your timezone.
sudo nano /etc/zabbix/apache.conf
Update the below line with correct timezone, more time zones.
<IfModule mod_php7.c> ... ... php_value date.timezone America/New_York ... ... </IfModule>
Create Zabbix database
Login to the MariaDB server and create a database for our Zabbix installation.
sudo mysql -u root -por
mysql -u root -pcommand as root in Ubuntu / Debian.
sudo mysql -u root -p
Create a database with the following details.
mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbixuser@localhost identified by 'password'; mysql> quit;
Once you are done creating a database for Zabbix installation, import the initial schema, and data into it.
cd /usr/share/doc/zabbix-server-mysql zcat create.sql.gz | mysql -u zabbixuser -p zabbix
Update Zabbix Configuration
Edit the zabbix_server.conf file to set the database details.
sudo nano /etc/zabbix/zabbix_server.conf
Make sure you set as follows.
DBHost=localhost DBName=zabbix DBUser=zabbixuser DBPassword=password
Restart all the services.
sudo systemctl restart zabbix-server zabbix-agent apache2
Enable the Zabbix services to start automatically on system reboot.
sudo systemctl enable zabbix-server zabbix-agent apache2
Configure Zabbix via Web Installer
Open a web browser and point it to the following URL.
Click Next Step on Zabbix welcome page.
This step verifies all pre-requisites are met for Zabbix Installation. If there are any issues, this page will tell you what all the extension are missing.
If everything is OK, click the Next Step.
Enter the Zabbix database name, DB user, and password, and then click Next Step.
Mention the Zabbix server details, port number, and the name for Zabbix installation.
You will get a pre-installation summary like below. Click Next Step to go to the next page.
Now, you have completed the installation of Zabbix. Click Finish.
Once after you clicked the Finish button, the installer will redirect you to the Zabbix Login Page.
Access Zabbix Server
Log in to Zabbix Server with the default username and password.
Now, you can proceed to install Zabbix Agent on client systems and then add client machines to Zabbix server for monitoring.