Zabbix Installation-Add host-monitoring items-triggers-warning media type-action

Source: Internet
Author: User
Tags rrdtool

Zabbix installation-creating hosts-monitoring items-triggers-warning media types

Zabbix is very powerful and comprehensive, but in contrast, Nagios is lighter and more flexible, especially with its plug-in mechanism, you can implement almost any monitoring you want to achieve in your familiar language. Nagios is relatively weak in charting, and if you just want to implement monitoring and alerting, Nagios is a good choice, as for charts, you can hand it over to cacti.

Zabbix maintenance is relatively difficult, nagios maintenance is relatively easy, cacti is the same. But cacti's data is not stored in a very good way, and the data in the past is too vague. Nagios's monitoring is relatively independent (the plug-in mechanism executes one command at a time), while the Zabbix monitor is relatively concentrated.

Cacti is a rrdtool to draw the network monitoring system, CACTI is integrated with a variety of data collection functions, and then use RRDtool to draw the monitoring graphics. Its own interface than similar systems to be pretty much, Cacti and Nagios is a different function of the system, nagios suitable for monitoring a large number of servers above the large number of services is normal, the focus is not on the graphical monitoring, its integration of many functions such as alarm, are Cacti not or very weak. Cacti's main use is to collect historical data and drawings, so the interface is much prettier than Nagios.

That there is no good graphical interface, and the alarm mechanism of a very strong monitoring system, we have a look at Zabbix (distributed Monitoring System), Zabbix set the Nagios alarm function and cacti drawing function, we look at the advantages of Zabbix:

First what is Zabbix:zabbix is an enterprise-class open source solution that provides distributed system monitoring and network monitoring capabilities based on a web interface. Zabbix has the following advantages over other monitoring software:

-Easy to install and configure, low learning cost

-Multi-language support (including Chinese, system comes with no additional installation plugin)

-Automatic discovery of servers and network devices

-Distributed monitoring and web centralized management capabilities (this is a distinct advantage over other monitoring software)

-User security authentication and soft licensing methods (e.g. LDAP authentication)

-Set or view monitoring results via the Web interface (graphical configuration)

-Email, SMS and other alarm functions

Zabbix installation (RPM):

I use the RPM method to install Zabbix, general environment, it is best to build lamp or LNMP environment to build Zabbix, I mysql,php,httpd already installed in advance, MYSQL,PHP,HTTPD can use the RPM method to install, Zabbix official website Download Zabbix RPM Package

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/91/wKioL1YBKcuS722VAANfScvJCiQ338.jpg "title=" 1.png " alt= "Wkiol1ybkcus722vaanfscvjciq338.jpg"/>



Install directly copy the package to the Zabbix server Yum Localinstall *.rpm can be installed automatically by Yum, or install the dependent package Yum-yinstall Iksemel libssh in advance Zabbix-server-implementation libodbc.so.2 Install the Zabbix Yum Library before executing the dependency package RPM-IVH Http://repo.zabbix.com/zabbix/2.4/rhel /6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm

Install the Zabbix after completion of the package:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/94/wKiom1YBKeXQCS2xAAD2b_e-ccc148.jpg "title=" 2.png " alt= "Wkiom1ybkexqcs2xaad2b_e-ccc148.jpg"/>


Next, modify the Zabbix configuration file:

/etc/zabbix/zabbix_server.conf Modify this file (Zabbix config file)

You can modify the following content:

dbhost=127.0.0.1

Dbname=zabbix

Dbuser=zabbix

dbpassword=123456

Dbsocket=/tmp/mysql.sock

dbport=3306

Now should do the most important thing, create Zabbix database, for the security of MySQL we should give Zabbix to create a user and Zabbix communication:

#create database Zabbix;

#grant all on zabbix.* to ' Zabbix ' @192.168.77.% ' identifiedby ' 123456 ';

#flush privileges;

Some of Zabbix's modules and data are imported into the Zabbix database I just created:

# \./usr/share/doc/zabbix-server-mysql-2.4.6/create/schema.sql

# \./usr/share/doc/zabbix-server-mysql-2.4.6/create/images.sql

# \. /usr/share/doc/zabbix-server-mysql-2.4.6/create/data.sql

The conditions for installing Zabbix have been completed start the server Open Zabbix Web page to complete the installation

Service zabbix-server Start (monitor tcp/10051 port)


In the viewer input: Http://IP/zabbix

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/94/wKiom1YBKwbwt4k8AAKGCY3hLXo499.jpg "title=" 3.png " alt= "Wkiom1ybkwbwt4k8aakgcy3hlxo499.jpg"/>

This is the Zabbix installation interface we choose Next

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/94/wKiom1YBKy2RbIZdAAMwGnBbTck209.jpg "title=" 4.png " alt= "Wkiom1ybky2rbizdaamwgnbbtck209.jpg"/>


Check the PHP modules are already supported (many newbies always have a lot of modules here that don't load up)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/91/wKioL1YBKzrx601gAALTBHACYKE727.jpg "title=" 5.png " alt= "Wkiol1ybkzrx601gaaltbhacyke727.jpg"/>


Connect to the database we'll just add the user name and password to the configuration file.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/94/wKiom1YBK0fzXYb0AAL-04c-gHA730.jpg "title=" 6.png " alt= "Wkiom1ybk0fzxyb0aal-04c-gha730.jpg"/>


After the installation is complete, this interface is already installed all done (is not very simple)

Server-side installation Complete We re-client is the agent installation:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/91/wKioL1YBK3mj0K0kAAAyujN5NAc266.jpg "title=" 7.png " alt= "Wkiol1ybk3mj0k0kaaayujn5nac266.jpg"/>

Client installation of the two RPM package, installed after the direct modification of the configuration file to specify a Zabbix server IP, agent configuration file:/etc/zabbix/zabbix_agentd.confàserver=192.168.77.101 This will then start the agent monitoring is the tcp/10051 port

To create a host:

After the installation is complete we add the host to make a simple experience (i switch to Chinese here, Zabbix supports many languages), create host also and simple click Configuration-Host-create host in upper right corner (group can be defined in advance)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/94/wKiom1YBK7uhIUcyAAJ00NeiNwo704.jpg "title=" 8.png " alt= "Wkiom1ybk7uhiucyaaj00neinwo704.jpg"/>


To create a monitoring entry:

Monitoring items Listen to the name also know that almost mean, with the host we are not monitoring any parameters, I have to define the host to monitor what parameters, then we create a monitoring item, monitor the network card traffic outbound situation, configuration-host-the top right corner to create a monitoring item

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/91/wKioL1YBK-mDG7WlAAdW5KrhkXI455.jpg "title=" 9.png " alt= "Wkiol1ybk-mdg7wlaadw5krhkxi455.jpg"/>


Such a monitoring item is created, and we look at the monitoring item that we just monitored can be monitored again-the latest data monitoring the monitoring item I just added

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/91/wKioL1YBK_vRf2hHAATGXMN5-to415.jpg "title=" 10.png "alt=" Wkiol1ybk_vrf2hhaatgxmn5-to415.jpg "/>


Trigger:

What is called a trigger, as the name implies when I define a monitoring item and then give a set of values, as long as the value of the monitoring item is greater than the value I set to trigger the trigger I set, then we will give the network card outbound traffic set a trigger

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/91/wKioL1YBLCTRiNzxAAKYtWaR2Rw566.jpg "style=" float: none; "title=" 11.png "alt=" Wkiol1yblctrinzxaakytwar2rw566.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/91/wKioL1YBLCSRfD4SAATqUY9CLZQ789.jpg "style=" float: none; "title=" 12.png "alt=" Wkiol1yblcsrfd4saatquy9clzq789.jpg "/>


Graphics:

Zabbix Graphics This function is very good, can be many of the same type of monitoring items into a picture to see, just now I defined a outbound station of the network card traffic, I now use the graph to create a picture of two images to view, so it is clear that many problems exist

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/94/wKiom1YBLHTR_UgJAAJ6b5vcCqY073.jpg "style=" float: none; "title=" 13.png "alt=" Wkiom1yblhtr_ugjaaj6b5vccqy073.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/91/wKioL1YBLHSBKg7eAAVbUwJ_PX0477.jpg "style=" float: none; "title=" 14.png "alt=" Wkiol1yblhsbkg7eaavbuwj_px0477.jpg "/>


Users and Groups:

Create the user first can alarm when the user is sent, the second can use the login Zabbix view monitoring items, etc.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/94/wKiom1YBLLHDBmmKAAGFauB_AfU021.jpg "style=" float: none; "title=" 15.png "alt=" Wkiom1ybllhdbmmkaagfaub_afu021.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/91/wKioL1YBLLHDES66AAFwc0nmHIU445.jpg "style=" float: none; "title=" 16.png "alt=" Wkiol1ybllhdes66aafwc0nmhiu445.jpg "/>

Warning Medium type (alarm type):

Media refers to what we trigger after the action is what the alarm, we are currently testing to the mail alarm, we are now local localhost's mailbox alarm, I now create a local mail media

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/94/wKiom1YBLNDSiHQdAAKsz4R4U-k877.jpg "title=" 17.png "alt=" Wkiom1yblndsihqdaaksz4r4u-k877.jpg "/>


Action:

Action is to meet what conditions will send the alarm, to whom, the first issue to who or who the second issue is not resolved we should not reflect to the CTO where and so on, this is the action, then we create an action, as long as the value of the trigger is equal to the condition in the action will send the message

Configuration-action-Create action

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/91/wKioL1YBLT3BLsdXAALmK_91fik127.jpg "title=" 1.png " alt= "Wkiol1yblt3blsdxaalmk_91fik127.jpg"/>


It is simple to send content and receive people

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/94/wKiom1YBLUix6tjuAAO8knTVQJU565.jpg "title=" 19.png "alt=" Wkiom1ybluix6tjuaao8kntvqju565.jpg "/>


This is the number of times sent and the sender and the media

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/91/wKioL1YBLWKQ5A8uAAM-ITsHwSg301.jpg "title=" 20.png "alt=" Wkiol1yblwkq5a8uaam-itshwsg301.jpg "/>


Here is the upgrade alarm as long as 1-9 times no one solved or was not resolved as long as sent to the CTO Mail

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/94/wKiom1YBLXPQ8vvKAAJwDGg13i0921.jpg "title=" 21.png "alt=" Wkiom1yblxpq8vvkaajwdgg13i0921.jpg "/>


So Zabbix monitoring process is complete we can find a lot of hosts ping192.168.77.150 see if we Zabbix will receive the alarm email, test start

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/91/wKioL1YBLZiwrB3yAATJaOJX-NI650.jpg "title=" 22.png "alt=" Wkiol1yblziwrb3yaatjaojx-ni650.jpg "/>650) this.width=650; src=" http://s3.51cto.com/wyfs02/M00/73/94/ Wkiom1yblapga12gaacvx9oponw909.jpg "title=" 23.png "alt=" Wkiom1yblapga12gaacvx9oponw909.jpg "/>


7 is the alarm message 8 is to resume normal mail

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/91/wKioL1YBLbmTcfRnAAKJ2C2gADk841.jpg "style=" float: none; "title=" 24.png "alt=" Wkiol1yblbmtcfrnaakj2c2gadk841.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/94/wKiom1YBLbmi_VRsAAIpvO5zeUw735.jpg "style=" float: none; "title=" 25.png "alt=" Wkiom1yblbmi_vrsaaipvo5zeuw735.jpg "/>


To now all is very normal, these are just some foundation, the future road is very long we will slowly walk, the success of the road not urgent, to step by step a pit.


This article is from the "experience-based staff" blog, please be sure to keep this source http://zhangjianxin.blog.51cto.com/10134758/1697199

Zabbix Installation-Add host-monitoring items-triggers-warning media type-action

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.