First, a brief introduction of the monitoring system
(1) Cacti: The storage data ability is strong, the alarm performance is poor
(2) Nagios: Poor alarm performance, storage data only a simple paragraph can determine whether the length of the data within a reasonable range, stored in memory. For example, continuous sampling data storage, there are three consecutive times not within a reasonable range of data on the alarm
(3) Zabbix: Combining the advantages of the above two tools, but also can store data, but also can alarm
Second, Zabbix characteristics
(1) Data sampling: Through SNMP, ssh, Telnet, agent, IPMI, JMX and other channels to capture the monitored host data. You can customize the detection mechanism and custom time intervals
(2) Real-time drawing: Display, read data drawing, support Graph,map,screen, slide show (slide show)
(3) Alarm: (Upgrade alarm, within the specified time can not resolve things to upload)
(4) Data storage: Database has mysql,pgsql, time series database and so on
Iii. Composition of the procedure
(1) Zabbix_server: Server daemon
(2) zabbix_agented:agent-side Daemon
(3) Zabbix_proxy: Proxy server (optional, distributed only)
(4) Zabbix_get: Command line tool, manual test data acquisition
(5) Zabbix_sender: Command line tool, run on agent side, send data to server side manually
(6) Zabbixjavagateway:java Gateway
650) this.width=650; "src=" http://si1.go2yd.com/get-image/0AnvGlN7W4m "style=" border:0px;margin:20px 0px; "alt=" 0anvgln7w4m "/>
Iv. deployment of Zabbix (monitoring side)
(1) Zabbix dependent database configuration
①yum Install Mariadb-server
②VIM/ETC/MY.CNF, under [Mysqld_safe], add
Skip_name_resolve=oninnodb_file_per_table=on
③systemctl start Mariadb.service, SS-TNL
④ Creating database: Create databases Zabbix CHARSET UTF8;
⑤ authorized a normal user (remote or local access to it): Grant all on zabbix.* to [email protected]'192.168.%.%' identified by 'zbxpass'; I'm setting up the remote, and the local is 127.0.0.1.
⑥flush privileges;
⑦exit;
(2) Configuring server-side components
① Installation Server: Yum install zabbix-server-mysql Zabbix-get
② Installing Webgui:yum Install Zabbix-web Zabbix-web-mysql
③ Install Agent side (you can monitor yourself): Yum install zabbix-agent Zabbix-sender
④zabbix Server Database initialization: (import create.sql into database)
cd/usr/share/doc/zabbix-server-mysql-3.0.7/gzip-d Creat.sql.gzmysql-h192.168.1.108-uzbxuser-p Zabbix < CREATE.S Ql
⑤mysql; use Zabbix; show TABLES; view
650) this.width=650; "src=" Http://si1.go2yd.com/get-image/0AnvGtnPpdQ "style=" border:0px;margin:20px 0px; "alt=" 0AnvGtnPpdQ "/>
(3) Modify the server configuration article :/etc/zabbix/zabbix_server.conf (Backup first)
①SOURCEIP: If there are multiple IPs, enable a source IP, the other authorized IP
②dbhost: Database service Address
③dbname: The same as we created
④dbuser: The same as we created
⑤dbpassword: Our Custom
⑥dbsocket: If database and server in the same host will be changed, not in the right.
⑦ start: Systemctl start Zabbix-server, note If CentOS is a 7.0 or 7.1 version of the trousers package to be updated.
650) this.width=650; "src=" Http://si1.go2yd.com/get-image/0AnvGsdZsS8 "style=" border:0px;margin:20px 0px; "alt=" 0anvgsdzss8 "/>
(4) Configure Other matters
① installation Php-mysql (Rpm-q php-mysql), front mounted
② configuration zabbix-web, configure the PHP time zone designation: vim/etc/httpd/conf.d/zabbix.conf, Php_value date.timezone Asia/shanghai
③ start Httpd:systemctl start Httpd.service
④ Visit: 192.168.1.108/zabbix
650) this.width=650; "src=" Http://si1.go2yd.com/get-image/0AnvGr7sI2S "style=" border:0px;margin:20px 0px; "alt=" 0anvgr7si2s "/>
⑤ all OK on this side is OK:
650) this.width=650; "src=" Http://si1.go2yd.com/get-image/0AnvGpfXraC "style=" border:0px;margin:20px 0px; "alt=" 0AnvGpfXraC "/>
⑥ going through the last few steps, okay.
650) this.width=650; "src=" http://si1.go2yd.com/get-image/0AnvGmsIs7c "style=" border:0px;margin:20px 0px; "alt=" 0anvgmsis7c "/>
V. Zabbix deployment (monitored, agent-based)
① Installation: Yum install zabbix-agent zabbix-sender-y
② Edit configuration file Cd/etc/zabbix, CP Zabbix_agentd.conf{,.bak}
③vim zabbix_agentd.conf
Passive monitoring, agent waits for server to come over request data passive checks related under the server=192.168.1.108 can be separated by a comma which active monitoring of authorization: the monitored side of the data to actively send to the server active checks Related Serveractive=192.168.1.108hostname= server-side normal host name
④ Start-up service: Systemctl start Zabbix-agent.service
Article Source: Marco Education
Official: Marco Linux operations
Technology Exchange Group: 485374463
This article is from the "Marco Linux Training" blog, so be sure to keep this source http://mageedu.blog.51cto.com/4265610/1895676
Zabbix deployment (Deployment on Linux/monitor side/monitored side)