Zabbix Deployment (i)

Source: Internet
Author: User
Tags snmp

1,Zabbixconstituent Parts

Note: This article references the Zabbix tutorial from Getting started to mastering the tutorial deployment, installed under the centos6.5 version.

Zabbix can run on Linux,Solaris,HP-UX,AIX,FreeBSD, Open BSD, OS X and other platforms.

(1) Zabbix server

through SNMP,Zabbix agent,Ping, port monitoring and other methods provide remote server / network status Monitoring, data collection and other functions.

Zabbixserver can monitor the service status of the remote server separately , and can also cooperate with the Zabbix agent to poll the Zabbix agent to actively receive the monitoring data (Agent ) andpassively receive data sent by the Zabbix agent (trapping mode ).

(2) Zabbix client

(3) ZabbixProcess Structure

ZABBIX_AGENTD: The client daemon is responsible for collecting client data, such as CPU,MEM,DISK, and so on.

Zabbix_get: command Tool, execute to obtain remote client data on server side or proxy side.

Zabbix_proxy: Agent daemon,server agent broker.

Zabbix_sender: used to send data to a server or proxy, often for lengthy checks.

Zabbix_server: server daemon,zabbix_agentd, Zabbix_agentd,zabbix_get,zabbix_proxy ,Zabbix_sender, andZabbix_java_gateway will eventually submit the data to the server.

Zabbix_java_gateway:java gateways, similar to Agentd, can only be used for Java Monitoring and can only proactively fetch data.

(4) ZabbixData Space Calculation

historical data: Days *(Total monitoring / refresh frequency)*24 hours *3600 seconds *50 bytes.

trend Data: Days *(Total monitoring /3600) *24 hours *3600 seconds *128 bytes.

event data: Number of days * number of events (approximate value)*24 hours *3600 seconds *130 bytes.

2, installationzabbix-2.4.7 (1)installationMysql-server,Apache,Php

# Installs the lamp environment for easy execution using the Yum method

Yum-y install MySQL mysql-devel mysql-server httpd httpd-devel php php-mysql php-common php-gd php-mbrstringphp-mcrypt ph P-devel Php-xml

# Configure mysql server, modify root password for love, set to boot

Servicemysqld start

Mysqladmin-uroot-p Password Love

Chkconfig--add mysqld

Ln-s/var/lib/mysql/mysql.sock/tmp/mysql.sock

# Configure /etc/php.ini

#PHPbcmath extension Missing (PHP configuration parameter--enable-bcmath)

#PHPmbstring extension Missing (PHP configuration parameter--enable-mbstring)

Max_execution_time= 300

Max_input_time= 300

memory_limit= 128M

Post_max_size= 16M

Date.timezone= asia/chongqing

Upload_max_filesize= 2M

Bcmath.scale= 1

# Configure httpdand set to boot

# Modify /etc/httpd/conf/httpd.conf

Servernamezabbix.carl.com:80

# Add index.html and index.php to /var/www/html

#index. php

<?php

$con =mysql_connect ("localhost", "root", "Love");

$sql = "Selectuser,password from user";

$db _select=mysql_select_db ("MySQL", $con);

$result =mysql_query ($sql, $con);

while ($row =mysql_fetch_array ($result))

{

echo$row["User"]. " ". $row [" Password "];

echo "<br/>";

}

Mysql_close ($con);

?>

#index. html

<title>ZabbixServer</title>

<body>

Hellozabbix Server

</body>

# Restart httpd server, use browser to open http://192.168.20.2/index.html and http://192.168.20.2 authentication

(2)installationzabbix-2.2.11

# Create user

Useraddzabbix-m-s/sbin/nologin

#configure: Error:curl Library not found

#configure: Error:invalid net-snmp directory-unable to find Net-snmp-config

#configure: Error:ssh2 Library not found

#configure: error:unable to find ' javac ' executable in Path

#configure: ERROR:LIBXML2 Library not found

Yum-y Install libcurl-devel net-snmp-devel libssh2-devel libxml2-devel php-bcmathphp-mbstring

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

--enable-server\

--enable-agent\

--enable-proxy\

--with-mysql\

--with-libcurl\

--with-libxml2\

--with-net-snmp\

--with-ssh2

make&& make Install

# Create data and authorized users

Mysql-u root-p-E "CREATE database Zabbix default CharSet UTF8"

Mysql-u Root-p-E "grant all privileges on zabbix.* to [email protected] by ' Zabbix '"

Mysql-u root-p Zabbix

Mysql-u root-p Zabbix

Mysql-u root-p Zabbix

# Configure /usr/local/zabbix/etc/zabbix_server.conf

Logfile=/var/log/zabbix_server.log

Dbname=zabbix

Dbuser=zabbix

Dbpassword=zabbix

dbport=3306

Dbsocket=/tmp/mysql.sock

# Boot Zabbix, default listener 10051 Port

Touch/var/log/zabbix_server.log

Chownzabbix:zabbix/var/log/zabbix_server.log

/usr/local/zabbix/sbin/zabbix_server

# Configure /usr/local/zabbix/etc/zabbix_agentd.conf

#/usr/local/zabbix/etc/zabbix_agentd.conf

#Server is passive , serveractive is active

Logfile=/var/log/zabbix_agentd.log

server=192.168.20.2

listenport=10050

serveractive=192.168.20.2

Hostname=zabbix.dnstest.com

# Create a log record file

Touch/var/log/zabbix_agentd.log

Chownzabbix:zabbix/var/log/zabbix_agentd.log

# Boot zabbix_agentd, default listener 10050 Port

/usr/local/zabbix/sbin/zabbix_agentd

#web Interface Configuration, change httpd running users and groups to Zabbix

Sed-i "S/user daemon/user zabbix/"/etc/httpd/httpd.conf

Sed-i "S/group daemon/group zabbix/"/etc/httpd/httpd.conf

mkdir/var/www/html/zabbix/

cp-rf/home/file/zabbix-2.2.11/frontends/php/*/var/www/html/zabbix/

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

# or

Chown-r zabbix:zabbix/var/www/html/zabbix/conf

# Install zabbix-2.2.11 on client

mkdir/usr/local/zabbix-2.2.11

./configure--prefix=/usr/local/zabbix-2.2.11--enable-agent && make &&make Install

# Modify /etc/service, add at the end

Zabbix-agent10050/tcp Zabbix Agent

ZABBIX-AGENT10050/UDP Zabbix Agent

Zabbix-trapper10051/tcp Zabbix Agent

ZABBIX-TRAPPER10051/UDP Zabbix Agent

# Modify /usr/local/zabbix/zabbix_agent.conf

server=192.168.20.2

serveractive=192.168.20.2

# Start zabbixagent

/usr/local/zabbix-2.2.11/sbin/zabbix_agentd

(3)Online ConfigurationZabbix

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7D/FE/wKioL1b010CiPUqNAAOsclN_RRM551.png "style=" float: none; "title=" Zabbix01.png "alt=" Wkiol1b010cipuqnaaoscln_rrm551.png "/>

# If you do not install PHP according to the above Yum method ,and the php.ini configuration, the following two images will appear

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/02/wKiom1b01qeiwlz9AAI2B0Wn4bY665.png "style=" float: none; "title=" Zabbix02.png "alt=" Wkiom1b01qeiwlz9aai2b0wn4by665.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7D/FE/wKioL1b010TyOFZYAAIsk6Q7gMU701.png "style=" float: none; "title=" Zabbix03.png "alt=" Wkiol1b010tyofzyaaisk6q7gmu701.png "/>

# The following two are the correct installation of PHP and configuration php.ini diagram

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7E/02/wKiom1b01qyhXFurAAItP75imqI520.png "style=" float: none; "title=" Zabbix04.png "alt=" Wkiom1b01qyhxfuraaitp75imqi520.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7D/FE/wKioL1b010mBj4nMAAIklqinggo267.png "style=" float: none; "title=" Zabbix05.png "alt=" Wkiol1b010mbj4nmaaiklqinggo267.png "/>

# Configure mysql database

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7E/02/wKiom1b01rHANSr4AAH4ZLHzMxk981.png "style=" float: none; "title=" Zabbix06.png "alt=" Wkiom1b01rhansr4aah4zlhzmxk981.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7D/FE/wKioL1b0102gnx6qAAHLb6RBaF8765.png "style=" float: none; "title=" Zabbix07.png "alt=" Wkiol1b0102gnx6qaahlb6rbaf8765.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/02/wKiom1b01rXwZJQ9AAHQKpJWD34754.png "style=" float: none; "title=" Zabbix08.png "alt=" Wkiom1b01rxwzjq9aahqkpjwd34754.png "/>


# Here you need to change directory conf permissions,Apache execution User is Zabbix, modify conf directory Permissions

#chown-R zabbix:zabbix/var/www/html/zabbix/conf, then click Retry .

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7D/FE/wKioL1b011HDLa-KAAG4W57UOsY783.png "style=" float: none; "title=" Zabbix09.png "alt=" Wkiol1b011hdla-kaag4w57uosy783.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7E/02/wKiom1b01riigTZSAAGi4dVkOk4118.png "style=" float: none; "title=" Zabbix10.png "alt=" Wkiom1b01riigtzsaagi4dvkok4118.png "/>


# Default User name / password:Admin/zabbix

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7D/FE/wKioL1b011TBXTwjAAFeTLv39Gs620.png "style=" float: none; "title=" Zabbix11.png "alt=" Wkiol1b011tbxtwjaafetlv39gs620.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/02/wKiom1b01ryAKXP3AAFh7RK9wt4049.png "style=" float: none; "title=" Zabbix12.png "alt=" Wkiom1b01ryakxp3aafh7rk9wt4049.png "/>


This article is from the "Love On Action" blog, please be sure to keep this source http://1055745601.blog.51cto.com/5003160/1755188

Zabbix Deployment (i)

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.