Linux Server Zabbix Monitoring deployment

Source: Internet
Author: User
Tags ldap protocol snmp disk usage

System version: CentOS 6.5 software version: zabbix-2.4.6.tar.gz


Zabbix is an enterprise-class open source solution that provides distributed system monitoring and network monitoring capabilities based on a web interface


Zabbix can monitor various network parameters, ensure the safe operation of the server system, and provide a flexible notification mechanism to enable system administrators to quickly locate/resolve various problems.


Functions and characteristics

Features: Monitor CPU load, memory usage, disk usage, network status, ports, logs, and other custom-developed plugins

Features: Simple installation and configuration, low learning costs, support for multiple languages (including Chinese), free open source, automatic discovery of server and network device SNMP, distributed monitoring and web centralized management capabilities, no agent monitoring, user security authentication and soft licensing, setting up or viewing monitoring results through the web interface , email and other notification functions


I. Deployment of ZABBIX

The server needs to install Zabbix servers and Zabbix Agent two services, the client only installs a service Zabbix agent, the monitoring principle is that the Zabbix Agent service will be obtained from the system of relevant data to the Zabbix Server, The Zabbix Server service then analyzes the data and displays it in a PHP page


1. Deployment environment: LNMP Reference "LNMP environment construction"


2. Preparation: Resolve dependencies, install package Net-snmp-devel and create Zabbix program users

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/7F/B0/wKiom1cpN22SswIbAAAW6DP2kSk627.jpg "title=" 1.jpg " alt= "Wkiom1cpn22sswibaaaw6dp2ksk627.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/7F/AE/wKioL1cpVsWQrPEXAAAY4Yc8a5s822.jpg "title=" 19.jpg "alt=" Wkiol1cpvswqrpexaaay4yc8a5s822.jpg "/>


3. Compile and install:

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/7F/AE/wKioL1cpPKXRsuBhAAB1fVno7EM814.jpg "title=" 2.jpg " alt= "Wkiol1cppkxrsubhaab1fvno7em814.jpg"/>

--prefix # #指定路径

--enable-server # #启用Server支持

--enable-agent # #支持Zabbix客户端

--with-mysql # #指定MySql库可以选择制定路径mysql_config, Mysql_config is the command used to compile the MySQL client program

--WITH-NET-SNMP # #支持snmp协议, need to install Net-snmp-devel package

--with-libcurl # #支持CURL功能, Libcurl main function is to use different protocols to connect to different servers, Libcurl currently supported protocols have Http,https,ftp,gopher,telent,dict,file, and LDAP protocol

Other parameters:

--enable-proxy refers to the support Zabbix Proxy Server, Zabbix Proxy is a monitoring proxy server, it collects monitoring data, choose to store in the buffer, save the time can be set through the configuration file, and then transfer the Zabbix server. The Monitoring Agent service requires a separate database.

Advantages of using Zabbix Proxy: Process monitoring, when the monitoring text to curb communications inconvenient, when the communication of thousands of devices, the use of Zabbix Proxy can simplify the maintenance of distributed monitoring, reduce the negative load of Zabbix server


When prompted as follows, use make install directly

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/7F/B0/wKiom1cpPTGAIx0OAABcdG3IHU8753.jpg "title=" 3.jpg " alt= "Wkiom1cpptgaix0oaabcdg3ihu8753.jpg"/>


4. Post-Installation adjustments

A. Create the database and database authorized users for Zabbix, where the database name, user name, and password are set to "Zabbix"

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/7F/B0/wKiom1cpQsyBvrjHAABalIxKSQU806.jpg "title=" 4.jpg " alt= "Wkiom1cpqsybvrjhaabalixksqu806.jpg"/>


Import Zabbix database Files Schema.sql, Images.sql, and Data.sql, and in Zabbix extract directory/database/mysql/, note the import order

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/7F/B0/wKiom1cpRM-jc8cPAAAwrFdONrE317.jpg "title=" 8.jpg " alt= "Wkiom1cprm-jc8cpaaawrfdonre317.jpg"/>

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7F/B0/wKiom1cpRIDQ5ULaAAApgpL1mdc821.jpg "style=" float: none; "title=" 5.jpg "alt=" Wkiom1cpridq5ulaaaapgpl1mdc821.jpg "/>

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7F/AE/wKioL1cpRVXDr17lAAApmna6E9U396.jpg "style=" float: none; "title=" 6.jpg "alt=" Wkiol1cprvxdr17laaapmna6e9u396.jpg "/>

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7F/B0/wKiom1cpRICDizJuAAAoXdv55NA140.jpg "style=" float: none; "title=" 7.jpg "alt=" Wkiom1cpricdizjuaaaoxdv55na140.jpg "/>


B. Because the current host is doing Zabbix server also do Zabbix client, so need to adjust zabbix_server.conf and zabbix_agentd.conf two configuration files

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/7F/B0/wKiom1cpTEiChnS-AABMtfNrsCo498.jpg "title=" 13.jpg "alt=" Wkiom1cpteichns-aabmtfnrsco498.jpg "/>

Configuration file, there are AGENTD and agent two configuration files, the former is the daemon, the latter relies on xinetd


Modify the zabbix_server.conf configuration file as follows

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/7F/AE/wKioL1cpSAPQla5bAAAeVVTQlDs967.jpg "title=" 9.jpg " alt= "Wkiol1cpsapqla5baaaevvtqlds967.jpg"/>

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/7F/B0/wKiom1cpSFnB4U4ZAAAmrm_9BO8096.jpg "title=" 10.jpg "alt=" Wkiom1cpsfnb4u4zaaamrm_9bo8096.jpg "/>

Modify the zabbix_agentd.conf configuration file as follows

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/7F/AE/wKioL1cpS_SyynSaAAAepWbTWn4867.jpg "title=" 11.jpg "alt=" Wkiol1cps_syynsaaaaepwbtwn4867.jpg "/>650) this.width=650; src=" http://s5.51cto.com/wyfs02/M00/7F/AE/ Wkiol1cptalyiffyaaarmr7g56c000.jpg "title=" 12.jpg "alt=" Wkiol1cptalyiffyaaarmr7g56c000.jpg "/>

Where both server and serveractive specify the IP address of the Zabbixserver, the difference is that the former is passive and the latter is active. That is, the former allows 127.0.0.1 this IP to me to fetch data, and Serveractive's 127.0.0.1 means that the client actively submits the data to it, "unsafeuserparameters" Support custom Script


C. Create a service startup script, Zabbix the startup script provided below the misc/init.d/of the source directory

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7F/B0/wKiom1cpTg3AFDf9AABTlot8eMw975.jpg "title=" 14.jpg "alt=" Wkiom1cptg3afdf9aabtlot8emw975.jpg "/>

Modify the Basedir path for two scripts

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/7F/AE/wKioL1cpUJyBU-DdAAAXOEbuAHk958.jpg "style=" float: none; "title=" 16.jpg "alt=" Wkiol1cpujybu-ddaaaxoebuahk958.jpg "/>

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/7F/B0/wKiom1cpT8fyYYVPAAAP1aXFhn4435.jpg "style=" float: none; "title=" 15.jpg "alt=" Wkiom1cpt8fyyyvpaaap1axfhn4435.jpg "/>


650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/7F/AE/wKioL1cpULiCI9kgAAAXp78KmE0195.jpg "style=" float: none; "title=" 17.jpg "alt=" Wkiol1cpulici9kgaaaxp78kme0195.jpg "/>

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7F/B0/wKiom1cpT-ORgioOAAAP1aXFhn4170.jpg "style=" float: none; "title=" 15.jpg "alt=" Wkiom1cpt-orgiooaaap1axfhn4170.jpg "/>


d. import PHP Web Control file 650) this.width=650; "Src=" http://s2.51cto.com/wyfs02/M00/7F/B0/wKiom1cpUVWA4sMIAAApL0rM4t4995.jpg " Title= "18.jpg" alt= "Wkiom1cpuvwa4smiaaapl0rm4t4995.jpg"/>


5. Start the Zabbix service

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7F/B0/wKiom1cpWK_AEjRZAABH_oC1CBc552.jpg "style=" float: none; "title=" 20.jpg "alt=" Wkiom1cpwk_aejrzaabh_oc1cbc552.jpg "/>

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/7F/B0/wKiom1cpWK-Tmp36AABtkhzDHsM551.jpg "style=" float: none; "title=" 21.jpg "alt=" Wkiom1cpwk-tmp36aabtkhzdhsm551.jpg "/>


6. Using a Web browser to access, configure Zabbix

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/7F/B2/wKiom1cpaeCz8crGAAFZeBrD9Hg599.jpg "title=" 22.jpg "alt=" Wkiom1cpaecz8crgaafzebrd9hg599.jpg "/>

Click Next to check the environment to see if there is a non-compliant environment

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/7F/B2/wKiom1cpaseTRasiAAFDoycjdYM327.jpg "title=" 23.jpg "alt=" Wkiom1cpasetrasiaafdoycjdym327.jpg "/>

Follow the prompts to modify the PHP configuration file

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/7F/B2/wKiom1cpbI_yE-ThAAAWpNZUa_k139.jpg "title=" 24.jpg "alt=" Wkiom1cpbi_ye-thaaawpnzua_k139.jpg "/>

Post_max_size = 16M #修改

Max_execution_time = #修改

Max_input_time = #修改

Date.timezone = Asia/shanghai #此行有注释, go to comment and modify

Always_populate_raw_post_data = 1 #此行取消注释即可

Modify and restart the PHP-FPM service later.

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7F/B2/wKiom1cpbVWRUwjBAAASQYSG4lY854.jpg "title=" 25.jpg "alt=" Wkiom1cpbvwruwjbaaasqysg4ly854.jpg "/>


Refresh the Web page again

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/7F/B2/wKiom1cpbauxAP7IAAEu-Gu3iC4941.jpg "title=" 26.jpg "alt=" Wkiom1cpbauxap7iaaeu-gu3ic4941.jpg "/>

Next, configure the database

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/7F/B0/wKioL1cpb1PRbxdHAAD2shPzHbk206.jpg "title=" 27.jpg "alt=" Wkiol1cpb1prbxdhaad2shpzhbk206.jpg "/>

After you have tested the database, perform the default actions below, and then proceed to the next step until you get an error as shown below, then follow the prompts to resolve

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/7F/B0/wKioL1cpb_3hS_6vAADujP2DjIU221.jpg "title=" 28.jpg "alt=" Wkiol1cpb_3hs_6vaadujp2djiu221.jpg "/>

Click Download this profile, upload to the specified directory, then click "Retry"

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/7F/B0/wKioL1cpcXbQ4Td-AAAfJ9gHX5c214.jpg "title=" 29.jpg "alt=" Wkiol1cpcxbq4td-aaafj9ghx5c214.jpg "/>650) this.width=650; src=" http://s3.51cto.com/wyfs02/M01/7F/B2/ Wkiom1cpcqjrknocaacom4pzxpc748.jpg "title=" 30.jpg "alt=" Wkiom1cpcqjrknocaacom4pzxpc748.jpg "/>

Finally click Finish to complete the installation


7. Login Zabbix, Default user name: admin, Password: Zabbix

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/7F/B2/wKiom1cpcdqxDKl0AAEQHQII8j0600.jpg "title=" 31.jpg "alt=" Wkiom1cpcdqxdkl0aaeqhqii8j0600.jpg "/>

So Zabbix installed, if you want to use the Chinese language interface, the operation is as follows, click on the top right corner of the page "profile"

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/7F/B0/wKioL1cpcyDSW5ZtAAHtXEnvfNM502.jpg "title=" 32.jpg "alt=" Wkiol1cpcydsw5ztaahtxenvfnm502.jpg "/>

If you go in there, your interface is like this.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/7F/B0/wKioL1cpdYHAdMXwAAGVADV3am4231.jpg "title=" 33.jpg "alt=" Wkiol1cpdyhadmxwaagvadv3am4231.jpg "/>

Description php missing GetText module, do the following to dynamically add modules

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7F/B0/wKioL1cpi6zxuY59AACVkAbu5_g162.jpg "title=" 34.jpg "alt=" Wkiol1cpi6zxuy59aacvkabu5_g162.jpg "/>

After adding the module, modify the PHP configuration file, add the following line, and then restart the PHP service

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/7F/B3/wKiom1cpi-vSi8niAAAXCHIOAsg812.jpg "style=" float: none; "title=" 35.jpg "alt=" Wkiom1cpi-vsi8niaaaxchioasg812.jpg "/>

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/7F/B0/wKioL1cpjMDBeyOFAAAOuZNAxEU894.jpg "style=" float: none; "title=" 36.jpg "alt=" Wkiol1cpjmdbeyofaaaouznaxeu894.jpg "/>

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/7F/B3/wKiom1cpjszBJedWAAAYqpXTKwg509.jpg "title=" 39.jpg "alt=" Wkiom1cpjszbjedwaaayqpxtkwg509.jpg "/>

Then re-refresh the page, you can select the language

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/7F/B0/wKioL1cpjUSR9yKAAAFrTakgKns678.jpg "title=" 37.jpg "alt=" Wkiol1cpjusr9ykaaafrtakgkns678.jpg "/>

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/7F/B0/wKioL1cpjdDj7UMxAAGlVp5dGdg086.jpg "title=" 38.jpg "alt=" Wkiol1cpjddj7umxaaglvp5dgdg086.jpg "/>


If you select Chinese, the Chinese font has a display box, download a TTF's Chinese font, rename the downloaded font to DEJAVUSANS.TTF and replace it with/usr/local/nginx/html/fonts/dejavusans.ttf.

Linux Server Zabbix Monitoring deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.