Construction of Zabbix Monitoring system

Source: Internet
Author: User
Tags snmp

System environment: Centos 6.8,lnmp,zabbix 3.0.3

First, preface

Zabbix is an enterprise-class, open-source, distributed monitoring suite, monitoring linux,windows, switching routing equipment, etc., which has become the most mainstream monitoring system nowadays. This Zabbix build is based on the previous blog LNMP environment to build the deployment, part of the preliminary preparation and the original LNMP.

LNMP Environment Construction Please refer to: http://zhoufan.blog.51cto.com/4278592/1793394.

Second, the preparation of the preparatory

1. Dependent Package Installation

Yum Install Net-snmp-devel

2. Mysql.sock Soft Connection (Zabbix default position is/tmp/mysql.sock)

Ln-s/data/mysqldb/mysql.sock/tmp/mysql.sock

3, PHP parameter configuration

Vim/etc/php.ini max_execution_time = Max_input_time = Post_max_size = 16M upload_max_filesize = 2M date.time Zone = PRC Always_populate_raw_post_data =-1

4, PHP add GetText module (Zabbix installation, GetText Check for one of the earlier PHP installation omission, you can add--with-gettext when installing PHP)

Cd/usr/local/src/php-5.6.17/ext/gettext//usr/local/php/bin/phpize./configure--with-php-config=/usr/local/php/ Bin/php-configmake && make install Vim/etc/php.ini extension=/usr/local/php/lib/php/extensions/ No-debug-zts-20131226/gettext.so

Third, compile and install Zabbix

1. Increase Zabbix Users

Groupadd zabbixuseradd–g Zabbix Zabbix

2. Compile and install Zabbix

Tar XF zabbix-3.0.3.tar.gzcd zabbix-3.0.3./configure--prefix=/usr/local/zabbix/--sysconfdir=/etc/zabbix/-- Enable-server--enable-agent--enable-agent--with-mysql--enable-ipv6--with-net-snmp--with-libcurl-- With-libxml2make && Makeinstall

3. Initializing database files

MYSQL–UROOT–P create databasezabbix;mysql-uroot–p ' ****** ' Zabbix < database/mysql/schema.sql mysql-uroot-p ' ****** * ' Zabbix < database/mysql/images.sql mysql-uroot-p ' ****** ' Zabbix < Database/mysql/data.sql

4. Configuring the Zabbix_server configuration file

vim/etc/zabbix/zabbix_server.conf Dbname=zabbix dbuser=root Dbpassword=password DBPort=3306

5. Zabbix command to join bash

vim/etc/profile.d/zabbix.sh path=/usr/local/zabbix/sbin/: $PATH export pathsource/etc/profile.d/zabbix.sh

6. Start Zabbix Service

Zabbix_server-c/etc/zabbix/zabbix_server.confzabbix_agentd-c/etc/zabbix/zabbix_agentd.conf

7, confirm that the Zaibbix service starts normally ( if there is a problem, please find the Reason in/tmp/zabbix_server.log,/tmp/zabbix_agentd.log. )

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/83/9D/wKiom1d34yfwtNVHAAATTWqJygo725.png-wh_500x0-wm_3 -wmp_4-s_4242569116.png "title=" Capture 0. PNG "alt=" Wkiom1d34yfwtnvhaaattwqjygo725.png-wh_50 "/>

Iv. Zabbix Management Website configuration

1. Copying front-end files

mkdir/data/zabbixcp-rp/usr/local/src/zabbix-3.0.3/frontends/php/*/data/zabbix/

2. Configure Nginx configuration file (just change the Web file path)

Location/{Root/data/zabbix; Index index.html index.php index.htm;}    Location ~ \.php$ {Root/data/zabbix;    Fastcgi_pass 127.0.0.1:9000;    Fastcgi_index index.php;    Fastcgi_param script_filename $document _root$fastcgi_script_name; Include Fastcgi_params;}

3. Access URL path HTTP://IP

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/83/9D/wKiom1d35VeDhwyPAABFfIHvjHY303.png "style=" float: none; "Title=" Captures 1. PNG "alt=" Wkiom1d35vedhwypaabffihvjhy303.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/83/9C/wKioL1d35VfTE4PNAABkMCE-gyk173.png "style=" float: none; "Title=" Captures 2. PNG "alt=" Wkiol1d35vfte4pnaabkmce-gyk173.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/83/9D/wKiom1d35VeibrNcAABSmibY2Bw948.png "style=" float: none; "Title=" Captures 3. PNG "alt=" Wkiom1d35veibrncaabsmiby2bw948.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/83/9C/wKioL1d35VjzkRACAABF6p1Pwq0506.png "style=" float: none; "Title=" Captures 4. PNG "alt=" Wkiol1d35vjzkracaabf6p1pwq0506.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/83/9D/wKiom1d35ViBqmLNAABbmiiKZYU335.png "style=" float: none; "Title=" captures 5. PNG "alt=" Wkiom1d35vibqmlnaabbmiikzyu335.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/83/9C/wKioL1d35ViAs1xUAABA4_rR0Wc924.png "style=" float: none; "Title=" captures 6. PNG "alt=" Wkiol1d35vias1xuaaba4_rr0wc924.png "/>


4. Prompt to create a change Zabbix configuration file manually

cd /data/zabbix/confcp -rp zabbix.conf.php.example zabbix.conf.phpvim zabbix.conf.php    $DB [' TYPE ']                      =  ' MYSQL ';   $DB [' SERVER ']                    =  ' localhost ';    $DB [' PORT ']                      =  ' 3306 ';   $DB [' DATABASE ']                  =  ' Zabbix ';   $DB [ ' USER ']                      =  ' root ';   $DB [' PASSWORD ']                  =  ' passwd '; 

5, Login Zabbix system, and change to Chinese display (Default user name: Admin, Password:Zabbix)

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/83/9C/wKioL1d35nDTRNfQAAAskpwKHEY432.png "style=" float: none; "Title=" Captures 8. PNG "alt=" Wkiol1d35ndtrnfqaaaskpwkhey432.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/83/9D/wKiom1d35nCxWvQJAACgAZDrXAQ456.png "style=" float: none; "Title=" Captures 9. PNG "alt=" Wkiom1d35ncxwvqjaacgazdrxaq456.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/83/9C/wKioL1d35nCDsxB6AABQpnwiTXc637.png "style=" float: none; "Title=" captures 10. PNG "alt=" Wkiol1d35ncdsxb6aabqpnwitxc637.png "/>

Five, PostScript

Zabbix is actually very simple to build, but this is just the beginning, there is a lot of monitoring options need to be configured, do not like to build nagios when the control of the script of the monitoring items, subsequent nginx,memcache,mysql and so on will be added to the monitoring.







This article is from the "Frank" blog, so be sure to keep this source http://zhoufan.blog.51cto.com/4278592/1795248

Construction of Zabbix Monitoring system

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.