Centos7_zabbix installation Configuration

Source: Internet
Author: User
Tags php mysql snmp

Zabbix is a web-based interface to provide distributed system monitoring and network monitoring capabilities of the enterprise-class open

Source solution.

Zabbix consists of 2 parts, Zabbix server and optional Components Zabbix agent.

Zabbix supports many monitoring methods: Agent,agent (Active mode), simple monitoring, SNMP,SNMP trap, etc.

Zabbix Server and Zabbix Agent support multiple platform LINUX,BSD,WINDOWS,MAC, etc.

Basic concepts

Project (Iterm): Defines an item that collects monitored data, such as collecting the memory usage of the monitored machine

Collection (application): is a summary of some items, the relationship between the directory and the file

Trigger (TRIGGER): Determine the definition of host State by the data obtained by the project (or by calculation)

Graph: Get data from a project and graphically display it

Template: You can summarize items, collections, triggers, graphs as a template, directly link to a class of master

To achieve batch definition

Host: Monitored objects, servers, or other network devices

Host group: A class of hosts can be defined to a host unit

Action: Trigger, auto-discovery, or auto-register status change triggered action

Autodiscover (Discovery): Add monitoring hosts in bulk with actions by defining auto-discovery criteria

Autoenrollment (auto-registraion): Agent sends registration request to server, server defines autoenrollment condition

Bulk Add hosts

Low-level Autodiscover (Low_discovery): With low-level autodiscover, you can simply define a type with multiple items

conditions, such as: monitoring of disk capacity, usually the disk will have more than one partition, we can use a definition to monitor the disk

All partitions on the

Maintenance (Maintenace): Define the host as appropriate for maintenance status

Topology map: can host direct topology

Screen (screents): Multiple types displayed in a screent

IT Services (IT service): Sometimes a host outage may not affect the service, IT service defines the limits of service tolerance

Degree

Instrument panel (dashboard): Monitor the overall status display

Overview (Overview): Displays data or trigger status for all machines

Web: Monitoring Web servers by defining scenarios

Latest data: View the latest data from the host project

Event: Record of change in trigger state

1. Install the dependent tools:

Yum-y installwget vim tree gcc-c++ autoconf httpd php mysql mysql-server php-mysqlhttpd-manual mod_ssl mod_perl mod_a Uth_mysql php-gd php-xml php-mbstringphp-ldap php-pear php-xmlrpc php-bcmath mysql-connector-odbc Mysql-devellibdbi-dbd-mysql Net-snmp Net-snmp-devel Curl-devel

2. Download the source package:

wget http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz

3. start the service and set the MySQL account password

Systemctl Restart Mysqld.service

Systemctl Start Httpd.service

Mysqladmin Password 123456

4. Create a user who needs to run Zabbix

Groupadd Zabbix

Useradd zabbix-g Zabbix

5. create the required database and authorize the user

Mysql>create database Zabbix characterset UTF8;

Mysql>grant all on zabbix.* [email protected] identified by ' 123456 ';

6. Import The table structure and data defined by Zabbix

CD database/mysql/

mysql-uzabbix–p123456 Zabbix <schema.sql

mysql-uzabbix–p123456 Zabbix <images.sql

mysql-uzabbix–p123456 Zabbix <data.sql

7. compiling and installing Zabbix server

./configure--prefix=/usr/local/zabbix \

--enable-server \

--enable-agent \

--with-mysql \

--enable-ipv6 \

--WITH-NET-SNMP \

--with-libcurl \

--WITH-SSH2 \

--enable-java

Make && make install

Configuration parameter Description:

--enable-server installing Zabbix Server

--enable-proxy Installing Zabbix Proxy

--enable-agent Installing the Zabbix Agent

--with-mysql using mysql as a database server

--WITH-NET-SNMP support for SNMP

--with-libcurl supports Curlfor web monitoring

8. Service Port definition

Vim/etc/services # # is appended at the back:

Zabbix-agent 10050/tcp #Zabbix Agent

Zabbix-agent 10050/UDP #Zabbix Agent

Zabbix-trapper 10051/tcp #Zabbix Trapper

Zabbix-trapper 10051/udp #Zabbix Trapper

9. Modify The Zabbix server configuration file

Mkdir/usr/local/zabbix/logs

Mkdir/usr/local/zabbix/pid

Chown–r Zabbix:zabbix/usr/local/zabbix/logs

Chown–r Zabbix:zabbix/usr/local/zabbix/pid

Vim/usr/local/zabbix/etc/zabbix_server.conf

Logfile=/usr/local/zabbix/logs/zabbix_server.log # # Log location, modify according to requirements;

Pidfile=/usr/local/zabbix/pid/zabbix_server.pid # #PID location

Dbhost=rqtbackup.mysql.rds.aliyuncs.com # # if not on this machine, please modify

Dbname=zabbix # # database name

Dbuser=zabbix # # database user name

Dbpassword=rqbao_zabbix # # Database Password

10. Install the startup script and add executable permissions

CP MISC/INIT.D/FEDORA/CORE/ZABBIX_SERVER/ETC/INIT.D

chmod +x/etc/init.d/zabbix_server

One by one. Modify the startup script to start zabbixserver

Vim/etc/init.d/zabbix_server

Basedir=/usr/local/zabbix # # Modify this,Zabbix 's installation directory

confile= $BASEDIR/etc/zabbix_server.conf # # Add this line, define the configuration file location


# Search Start, Modify startup options, default is to go to /etc down to find the configuration file

Action $ "Starting $BINARY _name:" $FULLPATH-C $CONFILE

/etc/init.d/zabbix_server start

copy The Web code to the directory specified in the HTTPD configuration file, typically /var/www/html

Cp-r Frontends/php/var/www/html/zabbix

Chown-r Apache:root/var/www/html/zabbix

Vim/etc/php.ini
Date.timezone = "Asia/shanghai"
Post_max_size = 16M
Max_execution_time = 300
Max_input_time = 300


Installing the Zabbix Web interface


1. Access Http://serverip/zabbix , install Zabbix Web side via interface

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7F/BE/wKioL1crNMPhqHHiAAH7tmT-gVU283.png "style=" float: none; "title=" 1.png "alt=" Wkiol1crnmphqhhiaah7tmt-gvu283.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7F/BE/wKioL1crNMWwyKCqAAFOg9yFA3s286.png "style=" float: none; "title=" 2.png "alt=" Wkiol1crnmwwykcqaafog9yfa3s286.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/BE/wKioL1crNMfAttuTAAEhD5URMJM389.png "style=" float: none; "title=" 3.png "alt=" Wkiol1crnmfattutaaehd5urmjm389.png "/>


Keep it by default

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7F/C1/wKiom1crM_KyBGVKAAEdO5_Y5Z4823.png "style=" float: none; "title=" 4.png "alt=" Wkiom1crm_kybgvkaaedo5_y5z4823.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/BE/wKioL1crNMrwPMz7AAEBQlmacjE842.png "style=" float: none; "title=" 5.png "alt=" Wkiol1crnmrwpmz7aaebqlmacje842.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7F/BE/wKioL1crNMzBhqvrAAD4mqXWeo8227.png "style=" float: none; "title=" 6.png "alt=" Wkiol1crnmzbhqvraad4mqxweo8227.png "/>

Default account: admin

Default password: Zabbix

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7F/C1/wKiom1crM_bh6pW_AADrpXUooVI518.png "style=" float: none; "title=" 7.png "alt=" Wkiom1crm_bh6pw_aadrpxuoovi518.png "/>


Change Chinese


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7F/BE/wKioL1crNM7iaDzSAAEObAv0P7A498.png "style=" float: none; "title=" 8.png "alt=" Wkiol1crnm7iadzsaaeobav0p7a498.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/BE/wKioL1crNNCT12GVAAPpvEJoBwQ030.png "style=" float: none; "title=" 9.png "alt=" Wkiol1crnnct12gvaappvejobwq030.png "/>


Installation of the Zabbix agent

1. installation of the Linux agent ( installed on another machine )

Tar XF zabbix-2.4.5.tar.gz-c/usr/local/src/

cd/usr/local/src/zabbix-2.4.5

2. download and unzip the compiled client

#./configure--prefix=/usr/local/zabbix--enable-agent
# Make && make install

Mkdir/usr/local/zabbix/logs

Chown-r Zabbix:zabbix/usr/local/zabbix/logs

3. Edit the configuration file

Cd/usr/local/zabbix/etc

Vim zabbix_agentd.conf

Logfile=/usr/local/zabbix/logs/zabbix_agentd.log

server=202.108.1.52 # # Server IP

serveractive=202.108.1.52 # # Active mode server IP

hostname=202.108.1.51 # # Setting host name

4. Install the Modify startup script

There is no script in this download, but in the 202.108.1.52 Zabbix source package there are

SCP MISC/INIT.D/FEDORA/CORE/ZABBIX_AGENTD/ETC/INIT.D

Vim/etc/init.d/zabbix_agentd

Basedir=/usr/local/zabbix # # Modify this

confile= $BASEDIR/etc/zabbix_agentd.conf # # Add this line, search start add blue code

Action $ "Starting $BINARY _name:" $FULLPATH-C $CONFILE

Service Zabbix_agentd Start


This article is from the "Good Big Knife" blog, please make sure to keep this source http://53cto.blog.51cto.com/9899631/1770550

Centos7_zabbix installation Configuration

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.