One: Zabbix Overview
Zabbix consists of 2 parts, Zabbix server and optional Components Zabbix agent.
Zabbix server can provide monitoring of remote server/network status through Snmp,zabbix agent, Ping, port monitoring, data collection and other functions, it can run on Linux, Solaris, HP-UX, AIX, free BSD, Open BSD, OS X and other platforms.
The Zabbix agent needs to be installed on the target server being monitored, and it mainly completes the collection of information such as hardware information or operating system-related memory, CPU, etc. Zabbix agent can run on Linux, Solaris, HP-UX, AIX, free BSD, Open BSD, OS X, TRU64/OSF1, Windows NT4.0, Windows 2000/2003/xp/vi STA) and other systems.
Zabbix server can independently monitor the service status of a remote server, and can also work with the Zabbix agent to poll the Zabbix agent to actively receive monitoring data (trapping) while passively receiving data sent by the Zabbix agent ( Trapping mode).
In addition, Zabbix Server supports SNMP (V1,V2), which can be used in conjunction with SNMP software (for example, NET-SNMP).
Main features of Zabbix:
Simple installation and configuration, low learning costs
Multi-lingual support (including Chinese)
Free Open Source
Autodiscover Server and network devices
Distributed monitoring and web centralized management capabilities
can be monitored without agents
User security authentication and soft licensing methods
setting or viewing monitoring results from the Web interface
Email notification function, etc.
II: Installation Deployment Zabbix2.1 LNMP Environment
Refer to the previous deployment documentation
2.2 Downloads Zabbix
wget http://120.52.73.47/nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.3/zabbix-3.0.3.tar.gz
2.3 Installing the JDK
TAR-XF JDK-8U92-LINUX-X64.TAR.GZMKDIR/USR/JAVAMV jdk1.8.0_92//usr/javacat >/etc/profile.d/java.sh << Eofexport path= $PATH:/usr/local/mysql/bin:/usr/local/php/bin:/usr/local/php/sbinexport JAVA_HOME=/usr/java/ Jdk1.8.0_92export java_bin=/usr/java/jdk1.8.0_92/binexport path=${java_home}/bin: $PATHexport CLASSPATH=.:${JAVA_ Home}/lib/dt.jar:${java_home}/lib/tools.jarjava-versionjava version "1.8.0_92" JAVA (TM) SE runtimeenvironment (build 1.8.0_92-B14) Javahotspot (TM) 64-bitserver VM (build 25.92-b14, Mixed mode)
2.4 Creating and importing Zabbix databases
TAR-XF zabbix-3.0.3.tar.gzmysql-uroot-p-s/data/3308/mysql.sockmysql> CREATE database Zabbix character set UTF8; Mysql> Grant all on zabbix.* to ' Zabbix ' @ ' localhost ' identified by ' 123456 ' with Grant Option;mysql > Flush Privileg Es;mysql-uzabbix-p123456-hlocalhost Zabbix </root/src/zabbix-3.0.3/database/mysql/schema.sql Import Database, Be sure to import mysql-uzabbix-p123456-hlocalhost Zabbix </root/src/zabbix-3.0.3/database/mysql/images.sqlmysql sequentially- Uzabbix-p123456-hlocalhost Zabbix </root/src/zabbix-3.0.3/database/mysql/data.sql
2.5 Installing Zabbix2.5.1 Adding Zabbix users
Useradd-u 8009-s/bin/false Zabbix
2.5.2 Compiling and installing
CD src/zabbix-3.0.3/./configure--prefix=/usr/local/zabbix--enable-server--enable-agent--WITH-NET-SNMP-- With-libcurl--enable-proxy--with-mysql=/usr/local/mysql/bin/mysql_config--enable-java--enable-ipv6-- With-libxml2
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/81/F6/wKiom1dGZkKhLwRQAADDHcm85TY227.png "title=" 01.png "alt=" Wkiom1dgzkkhlwrqaaddhcm85ty227.png "/>
Make Installln-s/usr/local/zabbix/sbin/*/usr/local/sbin/Add the system soft connection so you don't have to configure the environment variable ln-s/usr/local/zabbix/bin/*/usr/ local/bin/
2.6 Add port for Zabbix service
Cat >>/etc/services << eofzabbix-agent 10050/tcp #ZabbixAgentzabbix-agent 10050/udp #Zabbi X agentzabbix-trapper 10051/tcp #ZabbixTrapperzabbix-trapper 10051/udp #Zabbix trappereof
2.7 Adding a boot startup script
CD src/zabbix-3.0.3/cp-a./misc/init.d/fedora/core/zabbix_server/etc/init.d/cp-a./misc/init.d/fedora/core/zabbix _agentd/etc/init.d/sed-i ' [email protected]=/usr/[email protected]&/[email protected] '/etc/rc.d/init.d/zabbix_ Serversed-i ' [email protected]=/usr/[email protected]&/[email protected] '/etc/rc.d/init.d/zabbix_ Agentdchkconfig zabbix_server onchkconfig Zabbix_agentd on
2.8 Configuring Zabbix_server
chown -r zabbix.zabbix /usr/local/zabbix/directory permissions are important mkdir /var/log/zabbix/ Log directory chown -r zabbix.zabbix /var/log/zabbix/
Vim/usr/local/zabbix/etc/zabbix_server.conflogtype=filelogfile=/var/log/zabbix/zabbix_server.log log File DebugLevel = 3rd Log Level pidfile=/usr/local/zabbix/zabbix_server.piddbhost=localhostdbname=zabbixdbuser=zabbixdbpassword= 123456dbsocket=/data/3308/mysql.sock my side. Database is a multi-instance, need to specify socket login alertscriptspath=/usr/local/zabbix/share/zabbix/ Alertscripts Script Path
2.9 Configuring Zabbix_agentd
vim/usr/local/zabbix/etc/zabbix_agentd.confinclude=/usr/local/zabbix/etc/zabbix_agentd.conf.d/ Unsafeuserparameters=1
2.10 Configuring the Web site
CD src/zabbix-3.0.3/cp-r frontends/php//website/zabbixchown-r nginx.nginx/website/wget https://www.dwhd.org/ Wp-content/uploads/2015/05/simkai.ttf-o/website/zabbix/fonts/simkai.ttf Installing fonts
2.11 Start Service Login
Service Zabbix_server Restartservice zabbix_agentd restart
http://120.76.99.170/zabbix/setup.php
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/81/F5/wKioL1dGanzhyX-pAAAqBV0pX6Y343.png "title=" 2.png " alt= "Wkiol1dganzhyx-paaaqbv0px6y343.png"/>
If the hint is missing Gd-jpeg,gd-freetype, please follow the fix below to dynamically compile the PHP module
CD src/php-7.0.6/ext/gd/phpize./configure--with-php-config=/usr/local/php/bin/php-config--with-jpeg-dir-- With-freetype-dirmake && make Install
and then in php.ini Add module Support
Extention = gd.so
Other PHP parameter configuration:
Vim/usr/local/php/etc/php.inimax_execution_time =600max_input_time =300memory_limit =128Mpost_max_size = 32mdate.timezone =asia/shanghai
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/81/F5/wKioL1dGa3HCiAeHAABxT2-ZZuo507.png "title=" 3.png " alt= "Wkiol1dga3hciaehaabxt2-zzuo507.png"/>
All OK
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/81/F5/wKioL1dGa5ODSGtqAACN8frljgA963.png "style=" float: none; "title=" 4.png "alt=" Wkiol1dga5odsgtqaacn8frljga963.png "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/81/F7/wKiom1dGap7T9t39AABqCCpswts243.png "style=" float: none; "title=" 5.png "alt=" Wkiom1dgap7t9t39aabqccpswts243.png "/>
Default login name : admin Password: Zabbix
However found:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/81/F5/wKioL1dGa8HRaJkjAAAyUWg0544475.png "title=" 6.png " alt= "Wkiol1dga8hrajkjaaayuwg0544475.png"/>
The service did not start
The wrong line, first look at the diary, Mom eggs, I also know. The key is that the service does not start and the logs are not generated at all. In fact, there are, in/tmp/zabbix_server.log
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/81/F7/wKiom1dGay7TYnSFAAAqVE8G5RY980.png "title=" 7.png " alt= "Wkiom1dgay7tynsfaaaqve8g5ry980.png"/>
It should be MySQL . issues with shared libraries
echo "/usr/local/mysql/lib" >>/etc/ld.so.conf
Ldconfig
Systemctl Restart Zabbix_serversystemctl Restart Zabbix_agentdlsof-i: 10050lsof-i: 10051
Hint: Exclude can run ZABBIX_SERVER,ZABBIX_AGENTD command directly, will print out error message
Summary: Encountered an error is generally a lot of small details, such as directory permissions, file directory owner This kind of attention to
This article from "one step carefully break the red Dust" blog, please be sure to keep this source http://lorne.blog.51cto.com/9062483/1783382
zabbix3.0 based on CENTOS7 LNMP environment