Enterprise Monitoring Zabbix 2.4.7

Source: Internet
Author: User

Enterprise Monitoring Zabbix 2.4.7

1. Preface

The company needs to monitor the status of the current server. I decided to try to import Zabbix. Because most of the articles found by baidu are messy, I decided to read the original article and exercise the English skills.

2. theoretical part

Zabbix is an enterprise-level open-source solution that provides distributed system monitoring and network monitoring functions based on the WEB interface.

Zabbix can monitor various network parameters to ensure secure operation of server systems. It also provides a flexible notification mechanism for system administrators to quickly locate and solve various problems.

Zabbix consists of two parts: zabbix server and the optional component zabbix agent.

Zabbix server can provide remote server/network status monitoring, data collection and other functions through SNMP, zabbix agent, ping, port monitoring and other methods, it can run in Linux, Solaris, HP-UX, AIX, Free BSD, Open BSD, OS X, and other platforms.

3. Practice

3.1 Environment

ZabbixSer:

Ipaddress = 10.168.0.160

Hostname = zabbix

 

ClientSer:

Ipaddress = 10.168.0.8

Hostname = client

3.2 install yum Source

In zabbixSer:

1234 yum install -y mysql-server mysql-devel mysql yum install -y http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent yum install -y ntp

In clientSer:

12 yum install -y http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm yum install -y zabbix-agent

3.3 Server Configuration

In zabbixSer:

3.3.1. Step 1

Configure the innodb Engine table for separate storage and Character Set

Vim edit/etc/my. cnf

123 [mysqld] character-set-server=utf8 innodb_file_per_table=1

Start the database and set the default startup

12 /etc/init.d/mysqld start chkconfig mysqld on

Note: use the "mysql_secure_installation" command to initialize the database.

3.3.2. Step 2

1) log on to and create the database zabbix

12 mysql -uroot -p create database zabbix default charset utf8;

2) create an authorized user zabbix

12 grant all privileges on zabbix.* TO 'zabbix'@'localhost' identified by 'zabbix'; flush privileges;

3.3.3. Step 3

Import Data Tables

1234 cd /usr/share/doc/zabbix-server-mysql-2.4.7/create/mysql -uroot -p zabbix < schema.sql mysql -uroot -p zabbix < images.sql mysql -uroot -p zabbix < data.sql

3.3.4, sTep4

Configure the database connection file

1 Vim editing/etc/zabbix/zabbix_server.conf

Make sure that the following parameters are not commented out and the account password is consistent with the one defined above:

1234 DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix

3.3.5. Step 5

 

Start zabbix and set startup

1234 /etc/init.d/zabbix-server start /etc/init.d/zabbix-agent start chkconfig zabbix-server on chkconfig zabbix-agent on

3.3.6. Step 6

1) Adjust the system time zone to correct the system time

12 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtimentpdate 0.CentOS.pool.ntp.org

2) Adjust zabbix Parameters

Vim edit/etc/httpd/conf. d/zabbix. conf

Confirm the following parameters (the last time zone parameter is critical ):

123456 php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 php_value date.timezone Asia/Shanghai

3) Adjust ServerName

Edit/etc/httpd/conf/httpd. conf in vim.

Modify the parameters as follows (based on your needs ):

1 ServerName zabbix.cmdschool.org:80

3.3.7. Step 7

Start apache and set default startup

12  /etc/init.d/httpd start  chkconfig httpd on

3.3.8. Step 8

Firewall Configuration

1) edit/etc/sysconfig/iptables in vim.

Add the following lines:

12 -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT

2) restart the Firewall

1 /etc/init.d/iptables restart

3.3.9. Step 9

Logon Configuration

As shown in:

Click Next]

The page is displayed as follows:

As shown in:

All checks are in the "OK" status and click [Next]

The page is displayed as follows:

As shown in:

Enter the database information you configured and click Next]

The page is displayed as follows:

As shown in:

Retain the default value and click Next]

The page is displayed as follows:

As shown in:

Confirm that the information is correct and click Next]

The page is displayed as follows:

As shown in:

Return to the file creation success prompt and click Finish]

The page is displayed as follows:

As shown in:

Default Logon account and password:

Username: admin

Password: zabbix

Enter the preceding information and click Sign in.

3.3.10. Step 10

1) if the following warning information is displayed:

2) Solution

Disable selinux

1) temporarily close

1 setenforce 0

2) permanently close

Vim edit/etc/selinux/config

Modify the parameters as follows:

1 SELINUX=disabled

3.3.11. Step 11

Chinese method of webpage Interface

1) In windows, find the font file "regular ".

2) Upload the font to the "/usr/share/zabbix/fonts/" directory on the server.

3) modify language settings on the web page

As shown in:

Modify the arrow to specify some languages and click update.

3.4 add client Configuration

In clientSer

3.4.1. Step 1

Vim edit/etc/zabbix/zabbix_agentd.conf

Modify the parameters as follows:

123 Server=10.168.0.160 ServerActive=10.168.0.160 Hostname=Client.cmdschool.org

3.4.2. Step 2

Start the service and set the default start

12 /etc/init.d/zabbix-agent start chkconfig zabbix-agent on

3.4.3. Step 3

Enable the monitored Port

1 vim /etc/sysconfig/iptables

Add the following rules

1 -A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT

Restart the Firewall Service

1 /etc/init.d/iptables restart

3.4.4. Step 4

Disable selinux

1) temporarily close

1 setenforce 0

2) permanently close

Vim edit/etc/selinux/config

Modify the parameters as follows:

1 SELINUX=disabled

3.4.5,Step 5

In zabbixSer:

Server added to monitored host

As shown in:

Choose Configuration> Hosts> Create host]

The page is displayed as follows:

As shown in:

Enter parameters in the red circle and click Templates]

The page is displayed as follows:

As shown in:

In "Link new templaes", type "linux" and select "Template OS Linux]

Click Add and another Add.

Reference:

Http://www.zabbix.com/

Package address:

Http://www.zabbix.com/download.php

Manual:

Http://www.zabbix.com/documentation.php

Installation Method:

Https://www.zabbix.com/documentation/2.4/manual/installation/install_from_packages

MySQL configuration method:

Https://www.zabbix.com/documentation/2.4/manual/appendix/install/db_scripts

Some Zabbix Tutorials:

Compile and install Zabbix2.4.5 source code in Ubuntu 14.04

Install and deploy the distributed monitoring system Zabbix 2.06

Install and deploy the distributed monitoring system Zabbix 2.06

Install and deploy Zabbix in CentOS 6.3

Zabbix distributed monitoring system practice

Under CentOS 6.3, Zabbix monitors apache server-status

Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3

Install Zabbix 2.0.6 in 64-bit CentOS 6.2

ZABBIX details: click here
ZABBIX: click here

This article permanently updates the link address:

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.