Install Zabbix 3.4 based on CentOS 7

Zabbix is an enterprise-level distributed open source monitoring solution. Ability to monitor various network parameters and server health and integrity. Support flexible notification mechanism, provide excellent reports and [Data Visualization] (https://cloud.tencent.com/product/yuntu?from=10680) function. Zabbix supports active polling and passive capture. The most important thing is that the source code is distributed for free and can be used by the public at will. This is also one of the important reasons why it is widely popular among small and medium enterprises. This article briefly describes Zabbix features and the installation of Zabbix 3.4 based on CentOS 7.

1. Features of Zabbix##

data collection
Availability and performance check
Support SNMP (including capture and active rotation training), IPMI, JMX, VMware monitoring
Custom check
Collect required data at custom intervals
Executed by Server/Proxy and agents

Flexible threshold definition

Highly configurable alarm

Real-time charting
Use the built-in chart drawing function to immediately draw the content of the monitored item into a chart

Web monitoring function

Support custom graphics

Rich visualization options
Multiple monitoring item combinations are displayed in one view
Network topology diagram

Group inspection based on template

Secure user authentication

Written in C language, high performance

Two, Zabbix composition##

Server
Zabbix Server is the core storage for all configuration information, statistics and operating data. Used to report system availability, system completion integrity and statistical information, etc.

Data storage
The configuration information and the data collected by Zabbix are stored in the database, supporting mysql, pg, oracle.

Web display
Provides a web-based access interface (written in PHP language)

Client
Zabbix agents monitoring agents are deployed on monitoring targets, can actively monitor local resources and applications, and report the collected data to Zabbix Server.

Proxy proxy server
Zabbix proxy can collect performance and availability data for Zabbix Server. Proxy proxy server is an optional deployment part of Zabbix software; of course, Proxy proxy server can help a single Zabbix Server share the load pressure.

Three, Zabbix typical architecture deployment diagram##

Four, environmental preparation##

# more /etc/redhat-release          ##Demo environment
CentOS Linux release 7.4.1708(Core) 

# vi /etc/selinux/config                 ##Close selinux
SELINUX=disabled
# setenforce 0

# yum install mariadb-server mariadb -y    ##Install mariadb database
# systemctl start mariadb
# systemctl enable mariadb

## Add zabbix yum source, install zabbix server and web management
# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
# yum install zabbix-server-mysql zabbix-web-mysql -y 

# mysql      ##Log in to mysql to create a database and directory
Welcome to the MariaDB monitor.  Commands end with; or \g.
Your MariaDB connection id is 3
Server version:5.5.56-MariaDB MariaDB Server

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK,1 row affected(0.00 sec)

MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix#1235';
Query OK,0 rows affected(0.00 sec)

## Add zabbix metadata to mariadb
# zcat /usr/share/doc/zabbix-server-mysql-3.4.4/create.sql.gz | mysql -uzabbix -pzabbix#1235 zabbix

Five, configure zabbix

# cp /etc/zabbix/zabbix_server.conf /etc/zabbix/zabbix_server.conf.1121
# vim /etc/zabbix/zabbix_server.conf   ##Use the default configuration, only set the database password
DBPassword=zabbix#1235

# vim /etc/httpd/conf.d/zabbix.conf   ##Modify apache zabbix time zone
php_value date.timezone Asia/Shanghai

# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bk
# vim /etc/httpd/conf/httpd.conf                             ##Author : Leshami
Listen 3080     ##The non-default port 80 is used here##Blog  : http://blog.csdn.net/leshami

Start related services
 # systemctl start zabbix-server.service 
 # systemctl enable zabbix-server.service 
 # systemctl start httpd
 # systemctl enable httpd

 # netstat -nltp|egrep "zabbix|httpd|mysql"
 tcp        000.0.0.0:100510.0.0.0:*              LISTEN      15720/zabbix_server 
 tcp        000.0.0.0:30800.0.0.0:*              LISTEN      15385/httpd        
 tcp        000.0.0.0:33060.0.0.0:*              LISTEN      14146/mysqld        
 tcp6      00:::10051:::*                    LISTEN      15720/zabbix_server 

Firewall configuration
# firewall-cmd --add-port=3080/tcp --permanent 
# firewall-cmd --add-port=10051/tcp --permanent   
# systemctl reload firewalld.service 

Six, graphical interface installation and configuration##

Open the browser and enter http://yourip:port/zabbix

Environmental configuration detection, if it is not OK, return to the previous step for troubleshooting

Configure the connection to the database below

Server name and port configuration

finish installation

Login, default user name Admin, password zabbix

Seven, client installation and configuration##

For zabbix server, itself can also be monitored. For its own monitoring, the agent side should also be installed
For non-native agent installation, you should configure the yum source first, then install the agent side, modify the agent configuration file to point to the server side

# yum install zabbix-agent -y
# systemctl enable zabbix-agent.service

Agent configuration
[ root@ydq-mnt zabbix]# vim /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1,10.80.234.38
ServerActive=127.0.0.1,10.80.234.38
# systemctl start zabbix-agent.service

Eight, some matters needing attention##

1、 Before installation, it is recommended to configure the server and client /etc/hosts files, that is, add the IP mapping relationship between the server and the client to the current host
2、 Use a uniform Hostname in the server-side and agent-side configuration files, which are case sensitive. Otherwise, it is easy to fail to connect
3、 Open the firewall port, for non-local agent side, open port 10050

Recommended Posts

Install Zabbix 3.4 based on CentOS 7
CentOS 7.4 install Zabbix 3.4
CentOS 7.3 install Zabbix3
centos 6.5 install zabbix 4.4
Install Docker on Centos7
install LNMP on centos7.4
CentOS 8 install ZABBIX4.4 guide
Install Java on Centos 7
Nodejs install on centos7
Install FFmpeg on CentOS 8
Install RabbitMQ on CentOS 7
Install Node.js on Centos
Maven install on centos7
Install MongoDB on CentOS 7
Install Surelog on CentOS8
Openjdk install on centos7
Install Jenkins on centos7
install RabbitMQ on centos
Install RabbitMQ on CentOS 7
install Docker on centos6.5
install oracle on centos
Install Elasticsearch 6 on centos7
Install RabbitMQ on CentOS7
Centos 7 install Zabbix 3.4 original
Install mysql online on centos
Install ElasticSearch 7.x on CentOS 7
Install MySQL 8.0.16 on Linux Centos
Install docker transfer on Centos7
Install docker on Centos system
install EPEL repo on centos
install virtualbox on centos server
CentOS 8.0.1905 install ZABBIX4.4 version (verified)
Install Nginx server on CentOS 7
1.5 Install Centos7
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
Common Linux operations (based on centos7)
Install JDK8 in rpm on CentOS7
How to install Memcached on CentOS 8
Install MATE or XFCE on CentOS 7
How to install R on CentOS 8
How to install FFmpeg on CentOS 8
How to install Virtualbox on CentOS 8
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Jenkins on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install GCC on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
Install MySQL on Linux CentOS7 (Windows)
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
How to install Ruby on CentOS 8
How to install Skype on CentOS 8