咱們大概瞭解了怎麼對臺主機進行監控,主要步驟設計到添加主機,而且爲主機添加監控項,這裏主要爲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