Zabbix introduction of linux--monitoring System

Source: Internet
Author: User
Tags server website snmp

I. Overview of Zabbix

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

Zabbix can monitor various network parameters, ensure the safe operation of the server system, and provide a flexible notification mechanism to enable system administrators to quickly locate/resolve various problems.


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


Zabbix Server can provide monitoring of remote server/network status, data collection and other functions through Snmp,zabbix agent,ping, port monitoring, etc., which can run on Linux, Solaris, HP-UX, AIX, free BSD, Open BSD, OS X and other platforms.


The Zabbix agent needs to be installed on the target server being monitored, and it mainly completes the collection of information such as hardware information or operating system-related memory, CPU, etc. Zabbix agent can run in Linux,solaris,hp-ux,aix,free bsd,open BSD, OS X, TRU64/OSF1, Windows NT4.0, Windows (2000/2003/xp/ Vista) on top of the system.


Zabbix server can independently monitor the service status of the remote server, and can also cooperate with the Zabbix agent, polling the Zabbix agent to actively receive the monitoring data (agent mode), but also passively receive Zabbix The data sent by the agent (trapping mode).


In addition, Zabbix Server supports SNMP (V1,V2), which can be used in conjunction with SNMP software (for example, NET-SNMP).


Main features of Zabbix:  

    • -Easy to install and configure, low learning cost

    • -Multi-lingual support (including Chinese)

    • -Free Open source

    • -Automatic discovery of servers and network devices

    • -Distributed monitoring and web centralized management capabilities

    • -can be monitored without agents

    • -User security authentication and soft licensing method

    • -Set or view monitoring results through the web interface

    • -email and other notification functions, etc.

(Excerpt from Baidu Encyclopedia)


Second, the common noun of Zabbix

  • Host: The network device to monitor, which can be specified by IP or DNS name

  • Host group: A logical container for hosts that can contain hosts and templates, but hosts and templates within the same group cannot be linked to each other, and host groups are typically used when assigning monitoring permissions to a user or group of users

  • Monitoring item: The data of a particular monitoring indicator, which is derived from the monitored object, so item is the core of Zabbix data collection, no item, no data; Each item has a "key" identifier relative to a monitoring object

  • Trigger (Trigger): An expression that evaluates whether the data received within a particular item of a monitor object is within a reasonable range, that is, a threshold value, when the amount of data received is greater than the threshold, the trigger state is converted from "OK" to "Probelm", and when the amount of data is again recalled to a reasonable range, Its status will be converted from "problem" back to "OK"

  • Event: A matter of concern, such as the state transition of a trigger, the automatic registration of a new agent or a re-online agent, etc.

  • Action: Refers to a pre-defined processing method for a specific event, by including an action (such as sending a notification) and a condition (when the action is taken)

  • Alarm escalation (escalation): A custom scheme for sending alerts or performing remote commands, such as sending an alert at intervals of 5 packets, sending a total of 5 times, etc.

  • Media: A means or channel for sending notifications, such as an email, jabber, or SMS component with a development API

  • Notification (notification): Notification of events sent to the user through the selected media

  • Remote command: A predefined command that can be executed automatically when the monitored host is under a certain condition

  • Template: Used to quickly define a set of preset entries for a monitored host, usually containing item, trigger, graph, screen, application already low-level discovery rule ; templates can be linked directly to a single host

  • Application Scenario (application): A set of item combinations

  • Web Scene (Web Scennario): One or more HTTP requests to detect Web site availability

  • Previous paragraph (frontend): Zabbix Web Interface


Third, the experimental environment

IP Address Role
Installing the Software Operating system
172.16.88.2 Server side + monitored side + database storage
Zabbix-server, Zabbix-web, Zabbix-agent, mysql,php,httpd centos6.5
172.16.88.4 Monitored side Zabbix-agent centos6.5


Iv. installation of Zabbix

Zabbix can be used Rpm,yum, source code compiled and installed 3, we use the installation of compiling!

Download the source package:

Zabbix-2.0.9.tar.gz


    • On 172.16.88.2 server-side installation:

[email protected] ~]# Yum install mysql-server mysql-devel libcurl-devel net-snmp-devel php php-gd php-xml php-mysql php- Mbstring php-bcmath httpd[[email protected] ~]# tar XF zabbix-2.0.9.tar.gz[[email protected] ~]# CD Zabbix-2.0.9[[email PR OTECTED]OGILEFS2 zabbix-2.0.9]# groupadd zabbix[[email protected] zabbix-2.0.9]# useradd-g Zabbix Zabbix


    • Create a database (using MySQL database)

[Email protected] zabbix-2.0.9]# mysqlmysql> CREATE database Zabbix character Set UTF8 collate utf8_bin;mysql> gran zabbix.* to [email protected] ' localhost ' identified by ' Zabbix ';mysql> flush privileges;


    • Database file in the Zabbix-2.0.6/database/mysql directory, import it in

[[Email protected] ~]# CD Zabbix-2.0.9/database/mysql/[[email protected] mysql]# Mysql-uzabbix-pzabbix  Zabbix < Schema.sql[[email protected] mysql]# Mysql-uzabbix-pzabbix  Zabbix <images.sql[[email protected] mysql]# mysql- Uzabbix-pzabbix  Zabbix <data.sql


    • Compiling the installation

[Email protected] ~]# CD Zabbix-2.0.9[[email protected] zabbix-2.0.9]#./configure--prefix=/usr/local/zabbix-- Enable-server--enable-agent--with-mysql--enable-ipv6--with-net-snmp--with-libcurl[[email protected] zabbix-2.0.9 ]# make &&make Install


    • Modify the server configuration file

[[email protected] etc]# vim  /usr/local/zabbix/etc/zabbix_server.conf//modified as follows: Logfile=/tmp/zabbix_ Server.logdbname=zabbixdbuser=zabbixdbpassword=zabbixdbsocket=/var/lib/mysql/mysql.sock


    • Start

[[email protected] sbin]# Cd/usr/local/zabbix/sbin/[[email protected] sbin]#./zabbix_server[[email protected] sbin]# Netstat-tnlp

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/6D/wKiom1Ny_erBfUVLAALME3Z9_7o204.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiom1ny_erbfuvlaalme3z9_7o204.jpg "/>


    • Configure PHP

[Email protected] sbin]# Vim/etc/php.inidate.timezone =asia/shanghaipost_max_size = 32mmax_execution_time = 400max_ input_time = 400//Restart HTTP service [[email protected] sbin]# service httpd restart


    • Copy Web interface to www directory

[Email protected] sbin]# mkdir/var/www/html/zabbix[[email protected] sbin]# cd/root/zabbix-2.0.9/frontends/php/[[ Email protected] php]#  cp-a./var/www/html/zabbix/


Confirm that the Web server is configured and open, enter Http://172.16.88.2/zabbix to install the web!

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/6D/wKioL1Ny_xPCeiz9AAPKxyi2RK0673.jpg "title=" QQ Pinyin unnamed 1.jpg "alt=" Wkiol1ny_xpceiz9aapkxyi2rk0673.jpg "/>

Select Next

1, check which is not OK to solve

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/6D/wKiom1Ny_1yAw1CtAAT1lUi_Oqs932.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiom1ny_1yaw1ctaat1lui_oqs932.jpg "/>

This is all OK, direct next

2. Input database connection Information

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/6D/wKiom1Ny_4LgeWzsAAWJopOxOJg077.jpg "title=" QQ Pinyin unnamed 2.jpg "alt=" Wkiom1ny_4lgewzsaawjopoxojg077.jpg "/>

3. Enter your Zabbix service information

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/6D/wKioL1Ny_6OjviJyAAOj-J_Evnw842.jpg "title=" QQ Pinyin unnamed 3.jpg "alt=" Wkiol1ny_6ojvijyaaoj-j_evnw842.jpg "/>

4. Summary of previous operations

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/6D/wKiom1NzAFSQtntwAAQrZnbz_Dc726.jpg "title=" QQ Pinyin unnamed 4.jpg "alt=" Wkiom1nzafsqtntwaaqrznbz_dc726.jpg "/>

No problem, choose Next

5, first download this file, and then upload to the server, give 777 permissions, modify the user and group as Zabbix

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/6D/wKiom1NzAIbwh_B-AATHkI_KFMo045.jpg "title=" QQ Pinyin unnamed 5.jpg "alt=" Wkiom1nzaibwh_b-aathki_kfmo045.jpg "/>

6, no problem, choose Finish

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/27/6D/wKiom1NzALujSHNWAAMD_RMe5CU434.jpg "title=" QQ Pinyin unnamed 6.jpg "alt=" Wkiom1nzalujshnwaamd_rme5cu434.jpg "/>7, the default account for the admin, the password is Zabbix, then entered the Zabbix interface

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/6D/wKiom1NzAPbD3J6DAAUFvsrL7jE101.jpg "title=" QQ Pinyin unnamed 7.jpg "alt=" Wkiom1nzapbd3j6daaufvsrl7je101.jpg "/>

8. Change the language to Simplified Chinese

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/27/6D/wKiom1NzAkvzgqbrAAUkViou_Gg722.jpg "style=" float: none; "title=" qq pinyin unnamed. jpg "alt=" wkiom1nzakvzgqbraaukviou_gg722.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/27/6D/wKiom1NzAlDSsG6oAAQQtH98sh0653.jpg "style=" float: none; "title=" QQ Pinyin unnamed 1.jpg "alt=" Wkiom1nzaldssg6oaaqqth98sh0653.jpg "/>


When changing to Chinese, sometimes garbled, we can solve by the following actions!

1, in the Windows system in the C:\windows\fonts directory to copy a favorite, such as Simfang.ttf (Italic simplified);
2. Upload the Simfang.ttf file to the fonts directory in the Zabbix server's Web site directory, such as:/var/www/html/zabbix/fonts
3. Rename the original "Dejavusans.ttf" in the fonts directory in the Zabbix server website directory.

4. Change the uploaded file to Dejavusans.ttf.

5, only need to refresh a bit, no garbled!

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/6E/wKiom1NzBOni62uVAAZxiKi-Oa8391.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiom1nzboni62uvaazxiki-oa8391.jpg "/>


V. Simple configuration of Zabbix

    • First add the host:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/6E/wKioL1NzBp2DaJ9YAAKrg2uebtE071.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiol1nzbp2daj9yaakrg2uebte071.jpg "/>

The configuration is as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/71/wKioL1NzB43B6t_vAATyM8InbUo641.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiol1nzb43b6t_vaatym8inbuo641.jpg "/>


    • After adding the host, add the monitoring item:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/27/72/wKioL1NzCR2yrdLkAAQpsDOInAw083.jpg "style=" float: none; "title=" qq pinyin unnamed. jpg "alt=" wkiol1nzcr2yrdlkaaqpsdoinaw083.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/27/72/wKiom1NzCUyzQlRSAALgusNqJqQ032.jpg "style=" float: none; "title=" QQ Pinyin unnamed 1.jpg "alt=" Wkiom1nzcuyzqlrsaalgusnqjqq032.jpg "/>

Continue to add 3 items:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/27/72/wKiom1NzCsChTv_xAAKNr4XK_Z0881.jpg "style=" float: none; "title=" qq pinyin unnamed. jpg "alt=" wkiom1nzcschtv_xaaknr4xk_z0881.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/27/72/wKioL1NzCpuTtCMVAAKIcjYw7no191.jpg "style=" float: none; "title=" QQ Pinyin unnamed 1.jpg "alt=" Wkiol1nzcputtcmvaakicjyw7no191.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/27/72/wKiom1NzCsqSMnBsAAKs_N8Y0uo432.jpg "style=" float: none; "title=" QQ Pinyin unnamed 2.jpg "alt=" Wkiom1nzcsqsmnbsaaks_n8y0uo432.jpg "/>


    • Once the project has been added, we'll add the graphics!

On the host list, locate the corresponding host, then click the Graphics button, then click Create Graphic!

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/27/72/wKiom1NzDATCdZsdAAM6dRgIElA827.jpg "style=" float: none; "title=" qq pinyin unnamed. jpg "alt=" wkiom1nzdatcdzsdaam6drgiela827.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/27/73/wKiom1NzDGOi2g3pAAOieb0m4S4098.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiom1nzdgoi2g3paaoieb0m4s4098.jpg "/>



    • Then define the filter.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/73/wKiom1NzDLHxKF63AAHiE5hQ9z8333.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiom1nzdlhxkf63aahie5hq9z8333.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/27/73/wKioL1NzDQWwDgYoAARteycSc1k924.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiol1nzdqwwdgyoaarteycsc1k924.jpg "/>


    • Defining triggers

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/27/73/wKiom1NzDsCiV_F7AAE-isBjGyg911.jpg "style=" float: none; "title=" QQ Pinyin unnamed 1.jpg "alt=" Wkiom1nzdsciv_f7aae-isbjgyg911.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/27/73/wKioL1NzDpeCCr3aAAIahzjRXcg409.jpg "style=" float: none; "title=" qq pinyin unnamed. jpg "alt=" wkiol1nzdpeccr3aaaiahzjrxcg409.jpg "/>


    • Create a new medium

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/76/wKioL1NzESzyb2QyAANI3LFsfCU173.jpg "title=" QQ Pinyin unnamed 3.jpg "alt=" Wkiol1nzeszyb2qyaani3lfsfcu173.jpg "/>


    • Defining actions

Configuration > Actions > Create action

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/76/wKiom1NzEe3hkGHeAAJFpiKzHG4343.jpg "title=" QQ Pinyin unnamed 2.jpg "alt=" Wkiom1nzee3hkgheaajfpikzhg4343.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/27/77/wKioL1NzEduSw40uAANEkSbGkpE752.jpg "style=" float: none; "title=" qq pinyin unnamed. jpg "alt=" wkiol1nzedusw40uaaneksbgkpe752.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/27/77/wKioL1NzEd_ymYmyAAMSrf38iRg607.jpg "style=" float: none; "title=" QQ Pinyin unnamed 1.jpg "alt=" Wkiol1nzed_ymymyaamsrf38irg607.jpg "/>



    • View status

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/77/wKiom1NzEmvwmBi1AARm_AY4iM0374.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiom1nzemvwmbi1aarm_ay4im0374.jpg "/>650) this.width=650; src=" http://s3.51cto.com/wyfs02/ M02/27/77/wkiol1nzenwi4lxgaay9eu0-ppc901.jpg "title=" qq pinyin unnamed. jpg "alt=" wkiol1nzenwi4lxgaay9eu0-ppc901.jpg "/>


    • Test to see if the alarm will be:

Increase network card traffic by pinging 172.16.88.2来

To demonstrate the change, change the trigger to a flow greater than 1024, triggering the action!

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/27/7A/wKiom1NzFtewqHs8AAPuqSbfZ0A934.jpg "style=" float: none; "title=" QQ Pinyin unnamed 1.jpg "alt=" Wkiom1nzftewqhs8aapuqsbfz0a934.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/27/7A/wKiom1NzFt3wt_2OAAU0OKxKpzM774.jpg "style=" float: none; "title=" qq pinyin unnamed. jpg "alt=" wkiom1nzft3wt_2oaau0okxkpzm774.jpg "/>



    • Let's see if the administrator has received an email notification.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/7B/wKioL1NzF2ChKx5OAAPWAm5aZik379.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiol1nzf2chkx5oaapwam5azik379.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/7A/wKiom1NzF5uzopaGAAJHXUPKFLA520.jpg "title=" QQ Pinyin unnamed 1.jpg "alt=" Wkiom1nzf5uzopagaajhxupkfla520.jpg "/>

When traffic is normal, the state becomes normal.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/7B/wKiom1NzG22wfNA3AARKXnuel5M041.jpg "title=" QQ Pinyin unnamed 2.jpg "alt=" Wkiom1nzg22wfna3aarkxnuel5m041.jpg "/>


Vi. creating a module for Zabbix

Everyone is not found above for the host to create these projects, graphics, triggers very troublesome, we can define a module, let the creation of the host, associated with this module will be able to!

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/7C/wKioL1NzJGqAkNAtAAOmxTGY7EE183.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiol1nzjgqaknataaomxtgy7ee183.jpg "/>


    • Installation of another agent server:

The 172.16.88.4 also installs the Zabbix by compiling

[[email protected] ~]#  tar XF zabbix-2.0.9.tar.gz[[email protected] ~]#  CD Zabbix-2.0.9[[email protected] zabbix-2.0.9]# groupadd zabbix[[email protected] zabbix-2.0.9]# useradd-g Zabbix zabbix[[email protected] zabbix-2.0.9] #./configure--prefix=/usr/local/zabbix   --enable-agent[[email protected] zabbix-2.0.9]# make && make Install


Modifying a configuration file

[[email protected] ~]# vim/usr/local/zabbix/etc/zabbix_agentd.conf//modified as follows: server=172.16.88.2


Start the agent service

[Email protected] ~]# Cd/usr/local/zabbix/sbin/[[email protected] sbin]#./zabbix_agentzabbix_agent zabbix_   AGENTD [[email protected] sbin]#./zabbix_agentd


To view ports:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/7C/wKioL1NzJwvj3xAcAAHWfaiExms728.jpg "title=" QQ Pinyin unnamed 3.jpg "alt=" Wkiol1nzjwvj3xacaahwfaiexms728.jpg "/>


To connect to a new host:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/27/7C/wKiom1NzJ7SQqWhrAAP3Q5rxTlY394.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiom1nzj7sqqwhraap3q5rxtly394.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/27/7C/wKioL1NzJ5rzX_vKAAL0OQRN69U369.jpg "title=" QQ Pinyin unnamed 1.jpg "alt=" Wkiol1nzj5rzx_vkaal0oqrn69u369.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/27/7C/wKiom1NzKOiBB8J-AALTh9ZbP28616.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiom1nzkoibb8j-aalth9zbp28616.jpg "/>


When the traffic is over, there will still be alarms.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/27/7D/wKioL1NzKSnD7UFTAAN247tBUjE425.jpg "title=" QQ pinyin unnamed. jpg "alt=" wkiol1nzksnd7uftaan247tbuje425.jpg "/>650) this.width=650; src=" http://s3.51cto.com/wyfs02/ M00/27/7d/wkiol1nzkuiboiibaamgiipnk1q220.jpg "title=" qq pinyin unnamed. jpg "alt=" wkiol1nzkuiboiibaamgiipnk1q220.jpg "/>


At this point, Zabbix installation and simple application has been introduced, and later we will introduce the next Zabbix advanced applications!

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.