Getting Started with Zabbix

30 / Jun / 2016 by Arun Dhyani 0 comments

Zabbix is an Open source distributed monitoring tool. It allows us to monitor integrity and health of the server, network traffic,  and applications.  Zabbix uses a notification mechanism that allows users to configure e-mail based alerts for virtually any event. 

Components Used in Zabbix are as follows:

  • Zabbix Server : This is the central component that receives all the monitoring report and statistics. Zabbix server provides a web interface to present reports and statistics, as well as configure parameters.
  • Database Storage : All the configuration information, as well as monitoring data gathered, is stored in a database.
  • Zabbix Agent : Zabbix agent is a software that is deployed on the target machine that needs to be monitored. It is responsible for reporting the gathered data from the target to Zabbix Server.

Zabbix Server Installation


  • Mysql 5.3.0 or above

To install Zabbix Server in CentOs, follow the steps:

  1. Install Zabbix Server. By default httpd server is installed with Zabbix for hosting php code of Zabbix server UI. Zabbix server runs on 10051 port: 

yum install epel-release
rpm –import
rpm -Uv
yum install zabbix-server-mysql zabbix-web-mysql

  1. Edit the Zabbix configuration file using the following command:

vi /etc/httpd/conf.d/zabbix.conf

Update the timezone parameter in the file:

php_value date.timezone Asia/Kolkata

  1. Restart the httpd server:

systemctl restart httpd

  1. Create Database and user for Zabbix:

mysql -u root -p
mysql > create database zabbixdb character set utf8;
mysql > grant all privileges on zabbixdb.* to ‘zabbixuser’@’localhost’ identified by ‘your_password’;
mysql > flush privileges;
mysql > exit

  1. Import Zabbix Schema and data to zabbixdb:

mysql -u zabbixuser -p zabbixdb < /usr/share/doc/zabbix-server-mysql 2.4.5/create/schema.sql
mysql -u zabbixuser -p zabbixdb < /usr/share/doc/zabbix-server-mysql-2.4.5/create/images.sql
mysql -u zabbixuser -p zabbixdb < /usr/share/doc/zabbix-server-mysql-2.4.5/create/data.sql

  1. Edit Database configuration in zabbix_server.conf:

vi /etc/zabbix/zabbix_server.conf

Update the following parameters:


  1. Edit PHP configuration for Zabbix frontend:

vi /etc/php.ini

Update the following parameters in file :

max_execution_time = 600
max_input_time = 600
memory_limit = 256M
post_max_size = 32M
upload_max_filesize = 16M
date.timezone = Asia/Kolkata

  1. Make sure that either SELinux is disabled or apache is configured to communicate with Zabbix in SELinux.
  1. Now, start Zabbix and httpd server using below commands:

systemctl start zabbix-server
systemctl restart httpd

Configuring Server through Web UI

1. Open the browser and navigate to Zabbix_Server_ip/Zabbix:


2. On clicking Next, you will be taken to prerequisites window. It displays information about the softwares that are required by Zabbix Server:


3. Verify the version of software installed in the Server and Press Next to Continue:


4. Enter the Database Name, Database user, and password and Test the connection. Press Next to continue:


5. Enter Server Name and port and then Click Next:


6. Re-check the configuration parameter and Press Next:


Congratulation, you have successfully installed Zabbix Server. Click on finish to login to Zabbix server:


7. The default username and password is admin and zabbix respectively.


Zabbix Agent Installation

To Install Zabbix agent in CentOs, follow the steps:

  1. Install Zabbix agent on the target machine:

rpm –import
rpm -Uv
yum install zabbix-agent -y

  1. Update Zabbix Client Configuration file:

sudo vi /etc/zabbix/zabbix_agentd.conf

Update the following parameters in the file:


  1. Now, start Zabbix Agent using following command:

systemctl start zabbix-agent


Now, it’s time to add monitoring/target host on Zabbix Server

  1. Open Zabbix Server Web UI and Navigate to Configuration -> hosts and Click on create hosts:


  1. Provide Hostname, group and IP of the target machine. A group is a collection of related hosts. You can create new groups from Configuration -> Host groups -> create group.


  1. Click on template Tab and select a template from default templates provided by Zabbix Server. Template is used to group items. Items are the basis of gathering data in Zabbix. An item defines a single metric. We can also create custom items and templates.


  1. Click on Add to attach the template to host and then press Add to add the host for monitoring.

You have configured a host for monitoring.


  1. Now navigate to Monitoring -> Latest Data to view monitoring information:


  1. To view information in graphical format, navigate to Monitoring -> graphs, select the host and graph metric from the drop down menu:


Zabbix is an amazing open source monitoring tool which can also be used to monitor network traffic, to create a custom metric, perform web application monitoring and trigger alarm when system deviate from its usual behavior.

I hope it helps. In my next blog, we will learn how to create a custom metric and trigger the respective alarm.



Leave a Reply

Your email address will not be published. Required fields are marked *