Zabbix installation deployment under CentOS 6.3

Source: Internet
Author: User
Tags curl php language memory usage snmp centos create database iptables linux

Recently studied the next group to talk about the comparison of fire a foreign open source network monitoring system Zabbix, played after the deep by his interface concise, background configuration of logical classification clear, easy to configure the advantages of use to attract, immediately the unit system unified into this platform monitoring, testing for a period of time, the effect is good.

Played before cacti and Nagios, is a well-known industry commonly used in a complementary combination of network management, but the individual feel the former because of the call SNMP protocol, resulting in sometimes the network is not stable when there will be data loss, the latter Nagios although not dependent on SNMP, but the client's complex installation , the initial configuration and the need to read the plugin syntax can cause many beginners to be discouraged.

Zabbix not only absorb the advantages of both mapping and dynamic monitoring, and many plug-ins and common scripting templates are the system itself, the most important configuration relative to the previous two concise a lot, so save a lot of learning costs, and the monitoring system is written using PHP language, System personal customization without the user to modify the underlying code, but can directly in the Web interface to follow their own preferences, support font modification and Simplified Chinese, strongly recommend that you use this online network management platform.

Zabbix Introduction (excerpt from Baidu Encyclopedia)

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

Zabbix can monitor various network parameters, ensure the safe operation of the server system, and provide a soft notification mechanism for the system administrator to quickly locate/resolve the various problems. The Zabbix is composed of 2 parts, Zabbix server and optional component Zabbix Agent. Zabbix server can provide monitoring of remote server/network status through Snmp,zabbix agent,ping, port monitoring, data collection, etc., which can run on Linux, Solaris, HP-UX, AIX, free BSD, Open BSD, OS x platform. The Zabbix agent needs to be installed on the target server being monitored, which mainly completes the collection of information such as hardware information or operating system-related memory, CPU, etc. The 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/vis TA) and other systems. Zabbix Server can monitor the service state of a remote server separately, and can also work with the Zabbix agent to poll the Zabbix agent to receive monitoring data actively (trapping mode) while also passively receiving Zabbix The data sent by the agent (in trapping mode). In addition, Zabbix server also 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 cost

-Support for multiple languages (including Chinese)

-Free Open source

-Discover servers and network devices automatically

-Distributed monitoring and web centralized management capabilities

-can be monitored without agent

-User security certification and flexible licensing methods

-Set or view monitoring results through the web interface

-Email and other notification functions, etc.

Zabbix main functions:

-CPU Load

-Memory usage

-Disk usage

-Network status

-Port Monitoring

-Log Monitoring

Turn off iptables and SELinux before configuring to avoid errors during installation.

# Service Iptables Stop

# Setenforce 0

# Vi/etc/sysconfig/selinux

---------------

Selinux=disabled

---------------

I. Installation of LAMP environment

This BO transmission door: http://showerlee.blog.51cto.com/2047005/1174141

Second, Zabbix (server,agent) configuration:

server:192.168.7.201

agent:192.168.7.249

The simple mention, is actually the service side installs Zabbix_server,zabbix_agentd two service, the client only installs ZABBIX_AGENTD a service, the monitoring principle actually is zabbix_ The AGENTD service transmits the relevant data from the system to the Zabbix_server service, and then the Zabbix_server service displays the data as a PHP page, which is well understood.

(server) Represents server-side configuration only

(agent) Represents client-only configuration

(Server,agent) indicates that both the client and the server need to be configured

1. Download Zabbix (server,agent)

Note: I download the official 2.06 of the server and the client's stable integration of the compiler package, so later compile the attention of the--enable-server--enable-agent parameters compiled for the servers, the--enable-agent parameters compiled for the client.

Another way to download the official is that the server and the client separate the compilation package, the compilation method and the method of the BO, here please note the distinction.

# wget Http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.0.6/zabbix-2.0.6.tar.gz/download

2. Components required to install Zabbix (server,agent)

# yum-y Install Curl Curl-devel net-snmp net-snmp-devel perl-dbi

3. Create user account (Server,agent)

# Groupadd Zabbix

# useradd-g Zabbix Zabbix

# usermod-s/sbin/nologin Zabbix

4. Create Zabbix database and import Zabbix database data (server)

# mysql-u root-p123456

> Grant all on zabbix.* to zabbix@localhost identified by ' 123456 ';

> CREATE Database Zabbix;

# tar ZXVF zabbix-2.0.6.tar.gz

# CD zabbix-2.0.6

# mysql-uzabbix-p123456 Zabbix < Database/mysql/schema.sql

# mysql-uzabbix-p123456 Zabbix < Database/mysql/images.sql

# mysql-uzabbix-p123456 Zabbix < Database/mysql/data.sql

5. Compile and install (server,agent)

Server: (192.168.7.201)

#./configure--enable-server--enable-agent--with-mysql--enable-ipv6--with-net-snmp--with-libcurl

# make Install

Agent: (192.168.7.249)

#./configure--enable-agent

# make Install

Here the author because of the compile-time forgot to customize the installation directory caused Zabbix configuration file using the default path, under/usr/local/etc/, where the following changes to the next more places, followed by the content of this path will prevail.

Referring to friends of this Bo configuration, we recommend that you add the--prefix=/usr/local/zabbix parameter at compile time, the Zabbix configuration file defaults to the/USR/LOCAL/ZABBIX/ETC directory.

6. Edit configuration file (server,agent)

# cd/usr/local/etc/

Remove configuration file Comments:

# cat zabbix_server.conf |grep-v "#" |grep-v "^$" > Zabbix_server.conf.bak

# CP Zabbix_server.conf.bak zabbix_server.conf

# cat zabbix_agentd.conf |grep-v "#" |grep-v "^$" > Zabbix_agentd.conf.bak

# CP Zabbix_agentd.conf.bak zabbix_agentd.conf

Server: (192.168.7.201)

# vi/usr/local/etc/zabbix_server.conf

Modify the following and delete other unmodified parameter entries:

-------------

Logfile=/var/log/zabbix_server.log

Dbhost=localhost

Dbname=zabbix

Dbuser=zabbix

dbpassword=123456

-------------

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

Modify the following and delete other unmodified parameter entries:

-------------

Logfile=/var/log/zabbix_agentd.log

server=127.0.0.1,192.168.7.201

Unsafeuserparameters=1

-------------

Agent: (192.168.7.249)

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

Modify the following and delete other unmodified parameter entries:

-------------

Logfile=/var/log/zabbix_agentd.log

server=192.168.7.201

Unsafeuserparameters=1

-------------

Related Article

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.