Zabbix3.0 installation method, one-click Implementation of SMS, phone, APP alarm
Introduction
The free open-source monitoring tool Zabbix has been widely recognized by Internet companies for its powerful monitoring functions. The specific functions are not described in detail, the Zabbix 2.4.1 installation and text message reminders released earlier have been described in detail. This article mainly provides detailed instructions on Zabbix 3.0.1 installation, and details the one-click integration of OneAlert with Zabbix, one-minute notification by phone, text message, and email.
Installation instructions
Install Zabbix from 0
If you have never touched Zabbix, follow these steps to install Zabbix. The following describes how to monitor Zabbix 3.0.1 + OneAlert.
Zabbix server: 192.168.0.218 CentOS 7 64bit monitored machine: 192.168.0.219 CentOS 7 64bit
You can also refer to the official website for Installation
Installation process directoryStart zabbix 3.0 installation Zabbix-Server Installation Zabbix-Agent end add host
At last, we will introduce OneAlert's one-click integration with Zabbix to implement one-minute calls, text messages, and email notifications.
1. Start zabbix 3.0 Installation
Host 192.168.0.218. Install mysql first.
1. Extract
[Root @ opentsdb ~] # Tar zxvf zabbix-3.0.1.tar.gz
2. Jump to the mysql directory
[Root @ opentsdb ~] # Cd zabbix-3.0.1/database/mysql/
3. Import Database
[Root @ opentsdb mysql] #/usr/bin/mysql-uzabbix-pzabbix zabbix <schema. SQL
[Root @ opentsdb mysql] #/usr/bin/mysql-uzabbix-pzabbix zabbix <images. SQL
[Root @ opentsdb mysql] #/usr/bin/mysql-uzabbix-pzabbix zabbix <data. SQL
4. Install the Yum package
[Root @ opentsdb mysql] # yum-y install libxml2-devel net-snmp-devel libcurl-devel
5. Add users and groups
[Root @ opentsdb mysql] # groupadd zabbix
[Root @ opentsdb mysql] # useradd-g zabbix
Ii. Install the Zabbix-Server
Install on host 192.168.0.218
1. Compile and install
[Root @ opentsdb ~] # Cd zabbix-3.0.1
[Root @ opentsdb zabbix-3.0.1] #. /configure -- prefix =/usr/local/zabbix-server -- enable-server -- with-mysql -- with-net-snmp -- with-libcurl -- with-libxml2
After the above compilation is complete, the following will be displayed:
[Root @ opentsdb zabbix-3.0.1] # make install <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> Signature + sqLG9LavPC9wPg0KPHA + signature + PGJyIC8 + signature/Signature + 3b/iaXC12Na3PGJyIC8 + signature/aPGJyIC8 + signature + Signature signature + DQpbcm9vdEBvcGVudHNkYiB + signature/Signature + signature + DQo8cD4zLjXG9Lavt/Signature + DQo8cD7Tw + Signature = = "" src = "http://www.bkjia.com/uploads/allimg/160402/0409163607-1.png" title = "\"/>
Check whether the configuration is OK
After Login
3. Install Zabbix-Agent, ip Address: 192.168.0.219
1. install on host 192.168.0.219:
1.1 decompress
[Root @ druid ~] # Tar zxvf zabbix-3.0.1.tar.gz
[Root @ druid ~] # Cd zabbix-3.0.1
1.2 Add a user
[Root @ druid zabbix-3.0.1] # groupadd zabbix-agent
[Root @ druid zabbix-3.0.1] # useradd-g zabbix-agent
1.3 compile
[Root @ druid zabbix-3.0.1] #./configure -- prefix =/usr/local/zabbix-agent -- enable-agent
1.4 Installation
[Root @ druid zabbix-3.0.1] # make install
2. Edit the configuration file:
[Root @ druid ~] # Mkdir-p/var/log/zabbix
[Root @ druid ~] # Chown-R zabbix-agent: zabbix-agent/var/log/zabbix/
2.1 modify configuration
[Root @ druid ~] # Vim/usr/local/zabbix-agent/etc/zabbix_agentd.conf
LogFile =/var/log/zabbix/zabbix_agentd.log
Server = 192.168.0.218
ServerActive = 192.168.0.218
Hostname = zabbix. agent.219
User = zabbix-agent # consistent with the User created above
Allow port 10050 and port 10051 in iptables
[Root @ druid ~] # Iptables-I INPUT-p tcp-m multiport -- dports 10050: 10051-j ACCEPT
2.2 configure startup
[Root @ druid ~] # Ln-s/usr/local/zabbix-agent/etc/zabbix
[Root @ druid ~] # Ln-s/usr/local/zabbix-agent/bin/*/usr/bin
[Root @ druid ~] # Ln-s/usr/local/zabbix-agent/sbin/*/usr/sbin/
[Root @ druid ~] # Cp/root/zabbix-3.0.1/misc/init. d/fedora/core/zabbix_agentd/etc/init. d/
[Root @ druid ~] # Chmod 755/etc/init. d/zabbix_agentd
[Root @ druid ~] # Sed-I "s @ BASEDIR =/usr/local/zabbix-agent @ g"/etc/init. d/zabbix_agentd
[Root @ druid ~] # Chkconfig zabbix_agentd on
2.3 start
[Root @ druid ~] # Service zabbix_agentd start
4. Add hosts
Browse http: // 192.168.0.218/zabbix
Enter host information
Add Template
If the following error occurs:
Modify the php configuration file of zabbix:
[Root @ opentsdb ~] # Vim/var/www/html/zabbix/conf/zabbix. conf. php
Last successful interface:
Iv. Integration with OneAlert
1. Add an application
2. install my system centos 7:
[Root @ opentsdb ~] # Sudo AppKey = 5aedc348-4316-ba64-200d-7e063e66228a Plugin = zabbix sh-c "$ (curl-L https://raw.githubusercontent.com/oneapm/onealert-agent-installer/master/onealert-zabbix-install-centos7.sh )"
3. Restart zabbix server to receive an alarm.
The system implements centralized processing of all IT events on a platform to Improve IT reliability. For more information, visit the OneAlert official website.