We probably know how to monitor the host, the main steps are designed to add the host, and add monitoring items for the host, here is the main item, and then on the basis of the item to draw on the item and the way to the screen to bring the different monitoring images to a page. Through the quick chapter we recognize that item monitoring is very important in Zabbix, and item monitoring is defined by key, and key is divided into system predefined key and custom key composition, this section, We'll see how key is composed and used by Zabbix pre-defined memory key.
Key |
Parameters |
Type |
Unit |
Example |
Vm.memory.size[<mode>] |
Total (default), Active,anon, buffers, cached, exec, file, free, inactive pinned, GKFX, Wired, used, pused, available, p Available |
Numeric (unsigned) Decimal |
B |
Vm.memory.size[total]vm.memory.size[total]vm.memory.size[total]vm.memory.size[total] |
System.swap.in[<device>,<type>] |
Type:count,sectors pages |
Numeric (unsigned) Decimal |
B |
System.swap.in[,pages] |
System.swap.out[<device>,<type>] |
Type:count,sectors pages |
Numeric (unsigned) Decimal |
B |
System.swap.out[,pages] |
For all memory related keys already corresponding to the parameters, units, examples and other related information, below I will show an example of how to add a suitable memory key and fill in the corresponding unit, return value and other information in Zabbix Add item. Example 1: Monitor the total memory of the host and the remaining memory.
Through the chart and we can easily see the relevant correspondence relationship. The key vm.memory.size[<mode> in the corresponding chart in the Key:vm.memory.size[total], and the mode in brackets this corresponds to the parameters in the chart, here is total, of course, you can also fill in as needed, such as monitoring memory and the size of the use, which can be written as vm.memory.size[used]. Units in the chart for the Unit B, and so on the corresponding relationship is easy to see, there is not much to say. Then you can follow the example in the Quick section to draw the item and add it to screen.
1.1 Zabbix monitoring of Linux network cardsLinux The basic idea of network card monitoring and monitoring other Linux projects there's no difference. The first step is to add a Linux host, and the second step is to add the corresponding item for the Linux host. Any draw graph on the basis of item and then add the graph focus to a screen above the focus. The following chart is the relevant key used to monitor network card traffic.
Key |
Parameters |
Type |
Unit |
Example |
Net.if.in[if,<mode>] |
Bytes , packets errors, dropped |
Numeric (unsigned) Decimal |
Bps |
Net.if.in[eth0,errors] Net.if.in[eth0] |
Net.if.out[if,<mode>] |
Bytes , packets errors, dropped |
Numeric (unsigned) Decimal |
Bps |
Net.if.out[eth0,errors] Net.if.out[eth0] |
Net.if.total[if,<mode>] |
Bytes , packets errors, dropped |
Numeric (unsigned) Decimal |
Bps |
Net.if.total[eth0,errors] Net.if.total[eth0] |
Here you need to main add item when data storage type store value to select as Delta (speed per second) Example 1: Monitoring the import traffic of Linux host eth0 NIC item
Example 2: Monitoring of ETH0 network card egress traffic for Linux hosts item
Draw the network card for the Linux host eth0 network card.
1.1 Zabbix monitoring of the CPURelated key
Key |
Parameters |
Type |
Unit |
Example |
System.cpu.load[<cpu>,<mode>] |
Cpu:all, PERCPUAVG1,AVG5,AVG15 |
Numeric (float) |
No |
SYSTEM.CPU.LOAD[,AVG5] |
System.cpu.num[<type>] |
Online,max |
Numeric (unsigned) Decimal |
No |
System.cpu.num |
System.cpu.switches |
No |
Numeric (float) |
No |
System.cpu.switches |
System.cpu.util[<cpu>,<type>,<mode>] |
Cpu:all,numbertype:idle, Nice, user,iowait,interrupt, SOFTIRQ, Stealmode:avg1,av5,avg15 |
Numeric (float) |
% |
SYSTEM.CPU.UTIL[0,USER,AVG5] |
Example 1: Load of Linux host CPU item
Linux Host CPU Utilization drawing
1.1 Zabbix monitoring of the diskFirst we add the host, and add an item to the host, and then fill in the relevant content on item, where key is installed in the format below.
Key |
Parameters |
Type |
Unit |
Example |
Vfs.fs.size[fs,<mode>] |
FS: File system mode:total (default) free,used,pfree,pused |
Numeric (unsigned) Decimal |
B% |
Vfs.fs.size[/tmp,free] |
Vfs.file.size[file] |
File path |
Numeric (unsigned) Decimal |
B |
Vfs.file.size[/var/log/syslog] |
To monitor/partition space remaining size of item.
Drawing for item
1.1 put the monitored image into a screenCreate Screen:configureàscreenàcreate screen, where a screen named test,2 Row 2 column is created.
Create a post-entry as shown:
After selecting change, add the graph you want to join, create it for the Add memory graphic (created in 3.1), select and double-click the Save button to save it.
Double-click the Change button to add the 4 graph graph created in the previous section to screen in the name test.
1.1 Creating a template
3.6.1 Creating a template Select Configureàtemplatesàcreate Template
Enter the name and the group where you created the template, and then save it. At this point, you will find that there is more than one named Test_linux, but the inside of the data bits empty
3.6.2 importing data into a templateSelect the item for the host that you imported into the template, and then select Copy Select to and then double-click the Go button. As shown
Select the template you want to import, then double-click the Copy button, and the same way you can import the graph data into the template.
The use of 3.6.3 templates When you create a host, select the template button and click the Add button to select the associated template, and then select the Save button to save the page.
3.6.4 Template Import and export
3.6.4.1-Template ExportSelect Configureàtemplates Select the template you want to export, select the following export SELECTD and then double-click the Go button to export the template to the location you want to save.
3.6.4.2-Template ImportSelect Configureàtemplates-import after double-click the Browse button to select the template to import, the template type has been imported double-click, import can.
http://nanwangting.blog.51cto.com/608135/1118799
Zabbix Introduction to Proficient Zabbix monitoring of Linux hosts