Zabbix Configuring Deployment

Source: Internet
Author: User
Tags diff import database

Zabbix

Lab Environment:

Service side: 192.168.36.131

Client: 192.168.36.129

Iptables and SELinux disabled

I. Server-side configuration

1. Installation

# RPM-IVH http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/

zabbix-release-2.2-1.el6.noarch.rpm

# yum Install Zabbix-server-mysql Zabbix-web-mysql

2.mysql Database Related Configuration

Problem: Root enters MySQL error

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/86/E4/wKioL1fOSZvyyELuAAA0F81EjaI258.png-wh_500x0-wm_3 -wmp_4-s_553746843.png "title=" Image.png "alt=" Wkiol1foszvyyeluaaa0f81ejai258.png-wh_50 "/>

Resolution: Enter Safe Mode to modify the root password of MySQL

# Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &

# mysql-u Root MySQL

Mysql>update user SET Password=password (' Westos ') where user= ' root ';

Mysql>flush privileges;

Mysql> quit

Re-enter success, create Zabbix database

#/etc/init.d/mysqld Restart

# mysql-u Root-p

Enter a new password

Mysql> CREATE database Zabbix character set UTF8 collate utf8_bin;

Mysql>grant all privileges in zabbix.* to [e-mail protected] identified by ' Westos ';

mysql> flush Privileges;

Mysql> quit

3.zabbix User Login Verification

# mysql-u Zabbix-pwestos Zabbix

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| Information_schema |

| Zabbix |

+--------------------+

2 rows in Set (0.00 sec)

Mysl>quit

3. Import Database SQL scripts

# Find/-name Schema.sql

/usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql

/usr/share/doc/zabbix-proxy-mysql-2.4.5/create/schema.sql

# Find/-name Data.sql

/usr/share/doc/zabbix-server-mysql-2.4.5/create/data.sql

# Find/-name Images.sql

/usr/share/doc/zabbix-server-mysql-2.4.5/create/images.sql

Import Script #按此顺序导入, or there will be an error.

# mysql-u Zabbix-pwestos Zabbix < Schema.sql

# mysql-u Zabbix-pwestos Zabbix < Images.sql

# mysql-u Zabbix-pwestos Zabbix < Data.sql

4. Change the time zone

# Vim/etc/php.ini

946;d Ate.timezone = Asia/shanghai

5. Start the service

#/etc/init.d/zabbix-server Start

#/etc/init.d/zabbix-agent Start

#/ETC/INIT.D/HTTPD Start

5. Access Http://ip/zabbix

This trial visits: Http://192.168.36.131/zabbix

Enter the Welcome screen click to count to the next page

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/86/E5/wKiom1fOShygSOzyAAIVPWblLAA470.png-wh_500x0-wm_3 -wmp_4-s_3432832009.png "title=" Image.png "alt=" Wkiom1foshygsozyaaivpwbllaa470.png-wh_50 "/>

Test database connection-database name and user name ZABBIX,PASSWD is a previously set password

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/86/E4/wKioL1fOSkqA8sQRAAHoffI0_vE213.png-wh_500x0-wm_3 -wmp_4-s_588830806.png "title=" Image.png "alt=" Wkiol1foskqa8sqraahoffi0_ve213.png-wh_50 "/>

Zabbix Server Configuration

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/86/E4/wKioL1fOSnvA5jX3AAG9YXfOOzk925.png-wh_500x0-wm_3 -wmp_4-s_781693039.png "title=" Image.png "alt=" Wkiol1fosnva5jx3aag9yxfoozk925.png-wh_50 "/>

Information inspection

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/86/E4/wKioL1fOSqqhyWCkAAHE98qFGRE058.png-wh_500x0-wm_3 -wmp_4-s_1047433915.png "title=" Image.png "alt=" Wkiol1fosqqhywckaahe98qfgre058.png-wh_50 "/>

Prompt information

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/86/E5/wKiom1fOStfj8SV7AAGA4WLvJ0o511.png-wh_500x0-wm_3 -wmp_4-s_3328013994.png "title=" Image.png "alt=" Wkiom1fostfj8sv7aaga4wlvj0o511.png-wh_50 "/>

Username:admin;password:zabbix

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/86/E4/wKioL1fOSwHQTRq_AAE-GVglUTk026.png-wh_500x0-wm_3 -wmp_4-s_3623098429.png "title=" Image.png "alt=" Wkiol1foswhqtrq_aae-gvglutk026.png-wh_50 "/>

Two. Client Configuration

1. Installation

# yum Install-y zabbix-agent-2.4.5-1.el6.x86_64.rpm

# vim/etc/zabbix/zabbix_agentd.conf

server=192.168.36.131

serveractive=192.168.36.131

Name=test2.example.com

#/etc/init.d/zabbix-agent Start

# NETSTAT-ANTLP

TCP 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 4367/zabbix_agentd

TCP 0 0::: 10050:::* LISTEN 4367/zabbix_agentd

Three. Alarms

# git clone Https://github.com/lealife/WeiXin-Private-API

Script

/usr/lib/zabbix/alertscripts/weixin.sh

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/86/E4/wKioL1fOSyzgwFSSAAEg_ybK2fk257.png-wh_500x0-wm_3 -wmp_4-s_3604267979.png "title=" Image.png "alt=" Wkiol1fosyzgwfssaaeg_ybk2fk257.png-wh_50 "/>

Administration->media types->create Media type, adding alarms

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/86/E4/wKioL1fOS1aT-YDUAAAX45SLIiM927.png-wh_500x0-wm_3 -wmp_4-s_1466729448.png "title=" Image.png "alt=" Wkiol1fos1at-yduaaax45sliim927.png-wh_50 "/>

Administration->users-> the right drop-down list, select Users->admin->media add

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/86/E5/wKiom1fOS8aArrmJAACyPw6IG58226.png-wh_500x0-wm_3 -wmp_4-s_1571334996.png "title=" Image.png "alt=" Wkiom1fos8aarrmjaacypw6ig58226.png-wh_50 "/>

The configuration->actions->create action,action option is added as follows

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/86/E4/wKioL1fOS_LRNXjLAABTIUlDZV8123.png-wh_500x0-wm_3 -wmp_4-s_3671711623.png "title=" Image.png "alt=" Wkiol1fos_lrnxjlaabtiuldzv8123.png-wh_50 "/>

The operations option is added as follows

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/86/E4/wKioL1fOTGHiWkvHAACBfvRnv9E411.png-wh_500x0-wm_3 -wmp_4-s_703907072.png "title=" Image.png "alt=" Wkiol1fotghiwkvhaacbfvrnv9e411.png-wh_50 "/>

Four. Zabbix Mail Alarm

Administration->media types->create Media type, adding mail alerts

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/86/E5/wKiom1fOTI7juW7rAABVZfX_1Ps461.png-wh_500x0-wm_3 -wmp_4-s_1659336128.png "title=" Image.png "alt=" Wkiom1foti7juw7raabvzfx_1ps461.png-wh_50 "/>

Administration->users-> the right drop-down list, select Users->admin->media add

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/86/E5/wKiom1fOTLmxE7bMAACbAoXQBI4780.png-wh_500x0-wm_3 -wmp_4-s_802359697.png "title=" Image.png "alt=" Wkiom1fotlmxe7bmaacbaoxqbi4780.png-wh_50 "/>

The configuration->actions->create action,action option is added as follows

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/86/E5/wKiom1fOTQGjirNdAABh0Zh0r0c366.png-wh_500x0-wm_3 -wmp_4-s_3559378585.png "title=" Image.png "alt=" Wkiom1fotqgjirndaabh0zh0r0c366.png-wh_50 "/>

The operations option is added as follows

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/86/E4/wKioL1fOTTKQs-BwAACS-UaeKfk840.png-wh_500x0-wm_3 -wmp_4-s_2420853596.png "title=" Image.png "alt=" Wkiol1fottkqs-bwaacs-uaekfk840.png-wh_50 "/>

Five. Trigger Trigger

CPU Usage Monitoring

System. CPU .util[<CPU>,<type>,<mode>]

System. CPU . Util[0,user,avg5]

CPU specific number is the specific core of the CPU

Type is the different state value of the CPU

Idle, nice, user (default), System (default for Windows), iowait, interrupt, SOFTIRQ, steal

Where idle means idle, user indicates that users are using

The last avg5 represents the average value of every 5 minutes, empty represents the current value, to be changed to average every 15 minutes only need to write AVG15

Current CPU usage written System.cpu.util[,user], same as System.cpu.util[,idle]

Memory monitoring

Vm.memory.size[<mode>]

Total (default) , Active,anon, buffers, cached, exec, file, free ,

Inactive pinned, GKFX, Wired, used, pused, available, pavailable

The Trigger severity is used to display Trigger levels, and Zabbix supports several alert levels.

Level meaning color

Not classified unknown Grey

Information System Information Light Green

Warning Warning Yellow

Average General questions Orange

High severe warning red

Disaster data loss Bright Red

Ratings for other purposes: 1 different alarms represent different colors 2 sound alarms, different levels can be used to make alert prompts with different sounds. 3 different levels using different alarm notification methods, such as SMS email .....

Units supported by Trigger

S-Second H-hour

M min D Day

W Week K Kilo

M Mega G Giga

T Tera P PETA

E Exa Z Zetta

Y Yotta

Example, Configure->hosts->triggers

Example 1: Monitoring of disk partitions

Vfs.fs.size[fs,<mode>]

mode, the default is total, the remaining is the free,used,pfree,pused,p percentage, where the unit is%

The corresponding Unit is B (here the meaning is byte) and% if the monitor size: Numeric (unsigned) Decimal

Client-side partition crawl on Zabbix server

# zabbix_get-s 192.168.36.167-p 10050-k "vfs.fs.size[/dev/sda2,used]"

241664

New item, monitoring of partition/DEV/SDA2 usage

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/86/E4/wKioL1fOThngCJ92AACdHvaX1Ks369.png-wh_500x0-wm_3 -wmp_4-s_883866567.png "title=" Image.png "alt=" Wkiol1fothngcj92aacdhvax1ks369.png-wh_50 "/>

New trigger, host/dev/sda2 use space greater than 20% alarm

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/86/E5/wKiom1fOTkny6ZNHAABNTzGQAoU702.png-wh_500x0-wm_3 -wmp_4-s_914459818.png "title=" Image.png "alt=" Wkiom1fotkny6znhaabntzgqaou702.png-wh_50 "/>

Example 2:/etc/passwd changes the diff function

First, add a item:configure->hosts->items that the project uses to detect the MD5 value of the file

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/86/E5/wKiom1fOTnexd4I2AACZ2SsKEkg960.png-wh_500x0-wm_3 -wmp_4-s_1020440524.png "title=" Image.png "alt=" Wkiom1fotnexd4i2aacz2sskekg960.png-wh_50 "/>

Call the diff function

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/86/E4/wKioL1fOTqqB1DvgAABNQG5hH4k755.png-wh_500x0-wm_3 -wmp_4-s_1496677368.png "title=" Image.png "alt=" Wkiol1fotqqb1dvgaabnqg5hh4k755.png-wh_50 "/>

Example 3: Network card traffic 5 minutes continuous more than 100k alarm

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/86/E5/wKiom1fOTtiR_ehGAABZud8guAo961.png-wh_500x0-wm_3 -wmp_4-s_1988314924.png "title=" Image.png "alt=" Wkiom1fottir_ehgaabzud8guao961.png-wh_50 "/>

This article is from the "True Water No Fragrance" blog, please be sure to keep this source http://chengyanli.blog.51cto.com/11399167/1846805

Zabbix Configuring Deployment

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.