咱们大概了解了怎么对台主机进行监控,主要步骤设计到添加主机,而且为主机添加监控项,这里主要为item,而后在item的基础上对item进行绘图而且经过screen的方式把不一样的监控图像汇总到一张screen上。经过对quick章节咱们认识到item监控项在zabbix中是很是重要的,而item的监控是经过key来定义的,key又分为系统预约义好的key和自定义的key组成,这一节,咱们经过对zabbix预约义的内存key来了解一下key究竟是怎么组成和怎么使用的。linux
Key
|
参数
|
类型
|
单位
|
举例
|
vm.memory.size[<mode>]
|
total (default), active,anon,
buffers, cached, exec, file, free, inactive
pinned, shared, wired, used, pused, available, pavailable
|
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]
|
经过图表和截图咱们能够很方便的看出来相关的对应关系。截图中的key:vm.memory.size[total] 中的对应图表中的key vm.memory.size[<mode>]而中括号中的mode这对应图表中的参数,这里为total,固然了你们也能够根据须要填写,好比监控内存以及使用的大小,这能够写成vm.memory.size[used] 。截图中的单位对应图表中的单位B,等等对应关系很容易看出来,这里就很少说了。而后你们按照quick章节中的实例为item绘图而后加入到screen里就能够了。ui
Key
|
参数
|
类型
|
单位
|
举例
|
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]
|
Key
|
参数
|
类型
|
单位
|
举例
|
system.cpu.load[<cpu>,<mode>]
|
Cpu:all ,percpu
Avg1,avg5,avg15
|
Numeric (float)
|
无
|
system.cpu.load[,avg5]
|
system.cpu.num[<type>]
|
Online,max
|
Numeric (unsigned)
Decimal
|
无
|
system.cpu.num
|
system.cpu.switches
|
无
|
Numeric (float)
|
无
|
system.cpu.switches
|
system.cpu.util[<cpu>,<type>,<mode>]
|
Cpu:all,number
Type:
idle,
nice,
user,iowait,
interrupt,
softirq,
steal
Mode:avg1,av5,avg15
|
Numeric (float)
|
%
|
system.cpu.util[0,user,avg5]
|
Key
|
参数
|
类型
|
单位
|
举例
|
vfs.fs.size[fs,<mode>]
|
fs:文件系统
mode:total(默认)
free,used,pfree,pused
|
Numeric (unsigned)
Decimal
|
B
%
|
vfs.fs.size[/tmp,free]
|
vfs.file.size[file]
|
文件路径
|
Numeric (unsigned)
Decimal
|
B
|
vfs.file.size[/var/log/syslog]
|
选择change后添加想要加入的graph,下图为添加内存图形(3.1中建立)到screen中,选中后双击保存按钮就行保存spa
输入建立模板的名字和所在的组,而后保存便可。这时你们会发现多了一个名为test_linux可是里面的数据位空的设计
http://nanwangting.blog.51cto.com/608135/1118799blog