Zabbix (2)--Simple monitoring of Linux servers

Source: Internet
Author: User
Tags cpu usage

I. Overview

Zabbix inside the content and project a lot, simply want to achieve simple monitoring a server roughly need a few big steps: Define modify template, add machine, set alarm trigger, and to simple, even the template can not modify, loaded directly add machine can, This example focuses on how to add a new machine under the Linux platform as a description.

Second, define the template

Zabbix has built-in templates for different monitoring objects and platforms, such as Linux, Windows, and SNMP devices and related system services. and templates directly can be nested and call each other, the simplest way is that we add a monitoring node based on the platform and the type of monitoring directly select a template system can automatically monitor it, generate related graphics. But many times the built-in templates don't provide the kind of monitoring we want, or something we don't need to monitor at all, so we need to customize a template based on the actual situation. Template configuration location in:

configuration>templates

Define your own template based on the existing Linux monitoring template, and under the Templates page, select the Templates OS Linux , go in and click on " full clone" below to clone the template and name the template as " OS Linux , and then click ADD below to see the template defined in the template list.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/58/C7/wKioL1S8nBnA1_ Alaaazfzfbgna517.jpg "width=" 334 "height=" "/>,650" this.width=650; "style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/58/C7/ Wkiol1s8nbmhrhs0aabukdxbzwk967.jpg "width=" 366 "height="/>

Third, modify the template

1. Template monitoring Item items

Into the "OS Linux" template, which has a lot of monitoring content, where items are all predefined system monitoring items, according to the name can know that there is CPU, memory usage, disk and so on, in fact, can not make any changes. (In my environment, I have removed some of the documents about the similar/etc/passwd, which I think are useless.) )

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/58/C7/ Wkiol1s8nbrwstcwaaeougl6esm511.jpg "width=" 656 "height=" 149 "/>

2. Modify Graphs

Graphs is defined to generate graphs, and you can define, as needed, how the system will display graphics for which monitoring items. Linux system template in graphs there are five items, in fact, the default can not move, but I think "Memory usage" Display is too simple, only shows how much memory is available. Click to enter Memory usageto make changes:

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/58/C7/ Wkiol1s8nbrz5simaafbcj78lc8754.jpg "width=" 656 "height=" "/>"

In the above figure, the main modification of three, the other is what display high-width, there is a display type what, by default. Here we are going to add a graph of total memory size so that we can make a visual comparison with the current available memory.

    • MAX Value: Select Total memory under the template
    • Items : Add selects the total memory under the template, selects line in the Draw style , indicates that it is displayed in lines, the default is the Fill shape, can choose the color according to the preference and Preview to see the effect.

The final effect is as follows: Total memory 980M, 820M available.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/58/C7/ Wkiol1s8nbrj1e9eaafvien8ndk620.jpg "width=" 620 "height=" 233 "/>

3.Discovery Rule (Discovery rules)

As the name implies is found, mainly used to automatically discover the disk and network card, because you each server network card name and disk partition may be different, such as the network card is eth0, some eth1,br0 or other, etc., this rule is used to automatically identify the system network card and disk partition, And there are rules for this rule independent items monitoring items and graphs graphics definition, will find the network card automatically generated graphics, by default, can not make any changes.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/58/CA/wKiom1S8m0iz_ Uiyaad3_kvcucy603.jpg "width=" 622 "height=" "/>"

In this way we have defined the template, in fact, did not make any changes, if you want to simply do not have to define the template, is the system comes with the OS template is OK, but if the real use of the words may be a lot of people will be more or less to change some.

Iv. Adding Machines

1. Enter configuration>host>, click Create Host on the right.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/58/CA/ Wkiom1s8m0mxvbf-aac25xdez70019.jpg "width=" 477 "height="/>

2. Create a new host and add basic information on the host page

    • Hostname Host name: Apache server
    • Groups in to host select a group: Linux server,
    • Agent Interfaces: Add host IP address, because we are monitoring through the client agent, all to be added in agent interfaces,

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/58/CA/ Wkiom1s8m0mjwic9aadqqzkgeaw649.jpg "width=" 386 "height=" 299 "/>

3. In the Templates page to the Host association template

    • Select First, choose the previously defined template "OS Linux", then add template
    • At the bottom of the click Add, Commit, complete the machine Add.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/58/CA/ Wkiom1s8m0ngdkvvaadkqumurwe189.jpg "width=" 487 "height=" 213 "/>

On the configuration>host> page, you can see the hosts you have added, and you can see the associated templates.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/58/CA/ Wkiom1s8m0qrdegcaaerfi9mmws756.jpg "width=" 630 "height="/>

V. View monitoring

After a while in the monitor>graphs can choose the appropriate group and machine to view the generated graphics, network cards and partitions by default it takes half an hour to refresh, this value can be changed to a small, But if the server a lot of words in order not to let Zabbix pressure too big try not to find the scan time is too short to change. So the host monitoring is realized, of course, this is the most basic function, only let us see some of the current server state.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/58/CA/ Wkiom1s8m0qrgulmaajguz-z3-w492.jpg "width=" 623 "height=" 329 "/>

Vi. Other monitoring items

There are other items in the template definition that deal with items,graphs,discovery rules, such as applications, triggers, and more

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/58/CA/ Wkiom1s8m0rroewlaabqq7q-gnq223.jpg "width=" 568 "height="/>

    • applications: In fact, this is a collection of items inside a monitoring item, if all CPU monitoring to a class, all the memory and other items are classified, and then the monitor>latest data The values of the monitoring items in these collections can be displayed, and if they are not categorized, all items are displayed in monitor>latest data and appear disorganized and difficult to distinguish. Of course, you can define the classification and the monitoring items inside.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/58/CA/ Wkiom1s8m0vxrn-kaabxpqveijw720.jpg "width=" 244 "height=" 193 "/>

    • traggers: Used to flag which monitoring items need to trigger warning and problem thresholds, associated with corresponding monitoring items, such as defining CPU usage above 90% represents a problem, requires triggering a warning, and can define a warning level. The definition inside is slightly more complex and will be followed by some simple instructions.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/58/CA/ Wkiom1s8m0vhwyutaafipfm3heo058.jpg "width=" 596 "height=" 158 "/>

Summary: This is a simple demonstration of a Linux machine added to the monitoring system process, in view of my limited ability, and in order to quickly get started and do not have a detailed description of such as key, there is a chance to say in detail. The actual work is definitely more complex, some relatively high-level functions will be described in a gradual manner.

Zabbix (2)--Simple monitoring of Linux servers

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.