Zabbix is an Open Source, high-level enterprise software designed to monitor and keep track of networks, servers and applications in real time. Build in a server-client model, Zabbix can collect different type of data than are used to create historical graphics and output performance or load trends of the monitored targets.
The server has the ability to check standard networking services (HTTP, FTP, SMTP, IMAP etc) without the need to install extra software on the monitored hosts.
However, in order to gather data and create statistics about local services or other specific system resources that run on remote instances, such as CPU, disks, internal system process, RAM, etc, you need to install and configure a Zabbix agent.
Installing Zabbix Server
Step 2: Adding Apt Repository
Before installing Zabbix first configure zabbixzone rpm repository in our system using following commands.
Zabbix creates its own apache configuration file /etc/zabbix/apache.conf.Use following command to restart Apache service.
sudo service apache2 restart
Zabbix server configuration file are located at /etc/zabbix/zabbix_server.conf. Restart apache using below command.
sudo service zabbix-server restart
Installing zabbix agent on host system
Zabbix Agent is required to install on all remote systems needs to be monitor through Zabbix server. The Zabbix Agent collects resource utilization data and applications data on client system and provide such information to Zabbix server on their requests.
There are two types of checks between Zabbix Server and Client.
Passive Check : Zabbix Agent sent data to server on their request.
Active Check : Zabbix Agent sends data periodically to Server.
Step 1: Configure and Test Zabbix Agent in Linux
The next logical step after installing the packages on the system is to open Zabbix agent configuration file located in /etc/zabbix/ system path on both major distributions and instruct the program to send all the collected information to Zabbix server in order to be analyzed and processed.
Therefore, open zabbix_agentd.conf file with your favorite text editor, find the below lines (use the screenshots as a guide), uncomment them and make the following changes:
nano /etc/zabbix/zabbix_agentd.conf
add zabbix server IP address and hostname as shown below.
Configure Zabbix Agent - zabbix_agentd.conf
Server=IP of Zabbix Server
ServerActive=IP of Zabbix Server
Hostname=use the FQDN of the node where the agent runs
Step 2 :
Once you’ve finished editing the Zabbix agent configuration file with the required values, restart the daemon using the following command
service zabbix-agent restart
Or
systemctl restart zabbix-agent.service
Step 3: Add Zabbix Agent Monitored Host to Zabbix Server
On the next step it’s time to move to Zabbix server web console and start adding the hosts which run zabbix agent in order to be monitored by the server.
Go to Configuration - Hosts - Create Host - Host tab and fill the Host name field with the FQDN of the monitored zabbix agent machine, use the same value as above for Visible name field.
Zabbix is an Open Source, high-level enterprise software designed to monitor and keep track of networks, servers and applications in real time. Build in a server-client model, Zabbix can collect different type of data than are used to create historical graphics and output performance or load trends of the monitored targets.
The server has the ability to check standard networking services (HTTP, FTP, SMTP, IMAP etc) without the need to install extra software on the monitored hosts.
However, in order to gather data and create statistics about local services or other specific system resources that run on remote instances, such as CPU, disks, internal system process, RAM, etc, you need to install and configure a Zabbix agent.
Installing Zabbix Server Step 2: Adding Apt Repository
Before installing Zabbix first configure zabbixzone rpm repository in our system using following commands.
For Ubuntu 16.04 and ubuntu 16.10 :
wget http://repo.zabbix.com/zabbix/3.2/ubu...
sudo dpkg -i zabbix-release_3.0-1+xenial_all.deb
sudo apt-get update
For Debian 8:
wget http://repo.zabbix.com/zabbix/3.2/deb...
sudo dpkg -i zabbix-release_3.0-1+jessie_all.deb
sudo apt-get update
Step 2: Install Zabbix Server
After adding zabbix apt repository in your system use following command to install Zabbix using mysql database.
sudo apt-get install zabbix-server-mysql zabbix-frontend-php
Step 3: updating time zone
Update timezone in php configuration file /etc/php5/apache2/php.ini. Like below:
[Date] ; http://php.net/date.timezone date.timezone = 'continent/city'
Step 4: Create Database Schema
Now create a database schema for your zabbix server. First use following commands to create mysql database and user for your zabbix server
mysql -u root -p
mysql CREATE DATABASE zabbix; mysql GRANT ALL on zabbix.* to zabbix@localhost IDENTIFIED BY 'password'; mysql FLUSH PRIVILEGES; mysql quit;
Now restart zabbix database schema in newly created database
cd /usr/share/doc/zabbix-server-mysql
zcat create.sql.gz | mysql -u root -p zabbixdb
Step 5: Edit Zabbix Configuration File
Now edit zabbix server configuration file /etc/zabbix/zabbix_server.conf in your favorite text editor and update following entries.
DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=password
Zabbix creates its own apache configuration file /etc/zabbix/apache.conf.Use following command to restart Apache service.
sudo service apache2 restart
Zabbix server configuration file are located at /etc/zabbix/zabbix_server.conf. Restart apache using below command.
sudo service zabbix-server restart
Installing zabbix agent on host system Zabbix Agent is required to install on all remote systems needs to be monitor through Zabbix server. The Zabbix Agent collects resource utilization data and applications data on client system and provide such information to Zabbix server on their requests.
There are two types of checks between Zabbix Server and Client.
Passive Check : Zabbix Agent sent data to server on their request. Active Check : Zabbix Agent sends data periodically to Server.
Step 1: Configure and Test Zabbix Agent in Linux
The next logical step after installing the packages on the system is to open Zabbix agent configuration file located in /etc/zabbix/ system path on both major distributions and instruct the program to send all the collected information to Zabbix server in order to be analyzed and processed.
Therefore, open zabbix_agentd.conf file with your favorite text editor, find the below lines (use the screenshots as a guide), uncomment them and make the following changes:
nano /etc/zabbix/zabbix_agentd.conf add zabbix server IP address and hostname as shown below.
Configure Zabbix Agent - zabbix_agentd.conf Server=IP of Zabbix Server ServerActive=IP of Zabbix Server Hostname=use the FQDN of the node where the agent runs
Step 2 : Once you’ve finished editing the Zabbix agent configuration file with the required values, restart the daemon using the following command service zabbix-agent restart
Or
systemctl restart zabbix-agent.service
Step 3: Add Zabbix Agent Monitored Host to Zabbix Server
Go to Configuration - Hosts - Create Host - Host tab and fill the Host name field with the FQDN of the monitored zabbix agent machine, use the same value as above for Visible name field.