[CentOS 7Linux monitoring platform construction], zabbixx monitoring introduction and zabbixx installation #180201

hellopasswd


Linux monitoring platform introduction

Common open source monitoring software

  • cacti、nagios、zabbix、smokeping、open-falcon等等
  • cacti and smokeping are biased towards basic monitoring, and the mapping is very beautiful
  • The cacti, nagios, and zabbix server monitoring centers require PHP environment support. Both zabbix and cacti require mysql as data storage. Nagios does not need to store historical data, but focuses on the status of services or monitoring items. Zabbix will obtain the data of services or monitoring items. The data will be recorded in the database, so that it can be graphed
  • open-falcon was developed by Xiaomi. After open source, it is sought after by many large companies and operation and maintenance engineers. It is suitable for large enterprises. Big companies such as Didi, 360, Sina Weibo, JD.com are using this monitoring software, and it is worth studying.

Introduction to zabbixx monitoring

  • C/S architecture, based on C++ development, monitoring center supports web interface configuration and management
  • A single server node can support tens of thousands of clients
  • Official documentation https://www.zabbix.com/manuals
  • 5 components
  • zabbix-server monitoring center, receives the information reported by the client, and is responsible for configuration, statistics, and operation data
  • Data storage, storing data, such as mysql
  • The web interface and the web UI are also added. The operation configuration under the web interface is the main reason why zabbix is ​​easy to use.
  • zabbix-proxy is an optional component, which can replace the function of zabbix-server and reduce the pressure on the server
  • The zabbix-agent client software is responsible for collecting the data of each monitoring service or project and reporting it

install zabbix

  • Official website download address www.zabbix.com/download
  • wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
  • rpm -ivh zabbix-release-3.2-1.el7.noarch.rpm
  • yum install -y zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql
  • Will install httpd and php together
  • vi /etc/my.cnf character_set_server=utf9
  • After restarting the mysqld service, enter the mysql command line and create the zabbix library
  • create database zabbix character set utf8;
  • create user again
  • grant all on zabbix.* to 'zabbix'@'127.0.0.1' identified by 'user-zabbix';
  • Import Data
  • cd /usr/share/doc/zabbix-server-mysql-3.2.7
  • gzip -d create.sql.gz
  • mysql -uroot -pxxx zabbix < create.sql
[root@localhost ~]# cd /usr/local//src/
[root@localhost src]# wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
--2018-01-23 17:12:20--  http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
Resolving repo.zabbix.com (repo.zabbix.com)... 162.243.159.138
Connecting to repo.zabbix.com (repo.zabbix.com)|162.243.159.138|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13392 (13K) [application/x-redhat-package-manager]
Saving to: ‘zabbix-release-3.2-1.el7.noarch.rpm’

100%[================================================================================>] 13,392      --.-K/s   in 0s      

2018-01-23 17:12:24 (89.5 MB/s) - ‘zabbix-release-3.2-1.el7.noarch.rpm’ saved [13392/13392]

[root@localhost src]# rpm -ivh zabbix-release-3.2-1.el7.noarch.rpm 
warning: zabbix-release-3.2-1.el7.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:zabbix-release-3.2-1.el7         ################################# [100%]
[root@localhost src]# yum install -y zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql

[root@localhost src]# ps aux | grep mysql
root       1612  0.0  0.0 115388  1692 ?        S    11:31   0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/data/mysql --pid-file=/data/mysql/localhost.localdomain.pid
mysql      2216  0.1 24.4 973556 458036 ?       Sl   11:31   0:45 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/data/mysql/localhost.localdomain.err --pid-file=/data/mysql/localhost.localdomain.pid --socket=/tmp/mysql.sock
root       5004  0.0  0.0 112656   972 pts/2    S+   23:49   0:00 grep --color=auto mysql
[root@localhost src]# vi /etc/my.cnf
添加
      2 characher_set_server = utf8

for

[root@localhost src]# vi /etc/my.cnf
      1 [mysqld]
      2 characher_set_server = utf8
      3 datadir=/data/mysql
      4 socket=/tmp/mysql.sock
      5 server-id=132
      6 # Disabling symbolic-links is recommended to prevent assorted security risks
      7 symbolic-links=0
      8 # Settings user and group are ignored when systemd is used.
      9 # If you need to run mysqld under a different user or group,
     10 # customize your systemd unit file for mariadb according to the
     11 # instructions in http://fedoraproject.org/wiki/Systemd
     12 
     13 [mysqld_safe]
     14 #log-error=/var/log/mariadb/mariadb.log
     15 #pid-file=/var/run/mariadb/mariadb.pid
     16 
     17 #
     18 # include all files from the config directory
     19 #
     20 #!includedir /etc/my.cnf.d
     21 


Modified in 180201

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324983018&siteId=291194637