前一阵总结的一些key,梳理一下。                          ------ 小 Q

----------------------------------------------------------------------------------------------------

swap

1、system.swap.size[<device>,<type>]

交换分区大小字节或者百分比

device - 交换分区 (默认值 all)

type - free (free swap space, default), pfree (free swap space, in percent), pused (used swap space, in percent), total (total swap space), used (used swap space)

示例 :system.swap.size[,pfree] – 空闲swap百分比

2、system.swap.in[<device>,<type>]

交换分区IN(磁盘交换到内存)数字

device - 交换分区设备 (默认all)

type - 可选值: count (swapins数量), sectors(sectors swapped in), pages (pages swapped in).

示例key::system.swap.in[,pages]

3、system.swap.out[<device>,<type>]

Swap out (f内存到磁盘) .数字

device - swap设备 (默认all)

type-count (number of swapouts), sectors(sectors swapped out), pages (pages swapped out). 示

例key: system.swap.out[,pages]

cpu

1、system.cpu.load[<cpu>,<mode>]

CPU负载浮点数

cpu - 可用值: all (默认), percpu (所有在线cpu的负载)

mode - 可用值:avg1 (1分钟 默认值), avg5(5分钟平均), avg15 (15分钟平均值)

范例key::system.cpu.load[percpu,avg5]

wKiom1fmV6qg0r8zAAA27V6uu00706.png-wh_50

2、system.cpu.util[<cpu>,<type>,<mode>]

CPU利用率百分比

cpu - cpu数量 (默认是所有cpu)

type - 可用值: idle, nice, user (默认), system (windows系统默认值), iowait, interrupt, softirq,steal

mode - 可用值: avg1 (一分钟平均,默认值), avg5(5分钟平均, avg15 (15分钟平均值)

范例key:system.cpu.util[,iowait,avg5]

wKioL1fmVmPgzTboAAAwAWrDQtM606.png-wh_50

3、system.cpu.intr

设备中断整数

4、system.cpu.num[<type>]

CPU数量处理器个数type 

可用值: online (默认值), max

范例: system.cpu.num

memory

vm.memory.size[<mode>]

内存大小字节或百分比

mode - total (默认), active, anon, buffers, cached, exec, file, free, inactive, pinned, shared, wired, used, pused, available

监控项vm.memory.size[] 允许三种类型的参数:

第一类:包含total - 总内存

第 二类: 系统指定内存类型:active, anon, buffers, cached, exec, file, free, inactive,pinned, shared, wired. 

第三类:用户级别,一共使用了多少内存,还有多少内存可用: used, pused, available,pavailable.

范例:vm.memory.size[available]

wKiom1fmV2ORwXQpAAA5kHszO_k308.png-wh_50

vfs(disk. innode. file. )

1、vfs.fs.size[fs,<mode>]

磁盘空间,返回本地文件系统的使用量字节

fs - 文件系统

mode -  total (默认), free, used, pfree (空闲百分比), pused (使用百分比).

例如: vfs.fs.size[/data2,pused]

wKioL1fmV0Pjubt0AABCgIn0J-M746.png-wh_50

2、vfs.fs.inode[fs,<mode>]

inodes数量数字

fs - 文件系统

mode - total (默认), free, used, pfree (空闲百分比), pused (使用百分比)

例如: vfs.fs.inode[/,pfree]

3、vfs.file.time[file,<mode>]

文件时间信息Unix 时间戳.

mode -  modify (默认, 修改时间), access – 最后访问时间, change – 最后改变时间

例如::vfs.file.time[/etc/passwd,modify] 

备注:文件大小有限制

4、vfs.file.exists[file]

检测文件是否存在1 – 存在 0 – 不存在

file - 文件完整路径

icmp

1、icmppingsec[<target>,<packets>,<interval>,<size>,<timeout>,<mode>]

返回ICMP响应时间    秒s

target - 主机IP或者域名 packets - 包个数 interval - 包得响应时间,毫秒为单位 size - 包大小,字节为单位 timeout - 超时时间,毫秒为单位 mode -  min, max, avg (默认值)

举例;{61.147.117.144:icmppingsec.last()}>0.15

wKiom1fmV_zB3PtDAAAie2wh8dw992.png-wh_50

2、icmppingloss[<target>,<packets>,<interval>,<size>,<timeout>]

返回百分比     丢包率

target - 目标IP或者域名 packets - 包个数 interval -  连续包之间的时间间隔,以毫秒为单位 size - 包大小,字节为单位timeout - 超市时间,毫秒为单位

举例:{61.147.117.144:icmppingloss.last(0)}>20

wKioL1fmV-WQ3k2UAAAhyfA9XBo757.png-wh_50

3、icmpping[<target>,<packets>,<interval>,<size>,<timeout>]

检测是否支持icmpping    0 - ICMP ping失败1 - ICMP ping 成功

target - 主机IP或者域名packets - 包数量interval - 连续的数据包之间的时间间隔,以毫秒为单位 size - 包大小,以字节为单位 timeout - 超时时间,以毫秒为单位

例如: icmpping[,4] - 4个包只要一个有返回,那么将会返回1

举例:{61.147.117.144:icmpping.last(#5)}=0

wKioL1fmWB6DPvI9AAAguH7Ev9U221.png-wh_50

net

1、net.dns[<ip>,zone,<type>,<timeout>,<count>]

ip – DNS服务器的ip地址(留空表示使用本地DNS, ignored on Windows)

zone – 需要测试的域名

type – 记录类型 (默认为 SOA),ANY, A, NS, CNAME, MB, MG, MR, PTR, MD, MF, MX, SOA, NULL, WKS (except for Windows), HINFO, MINFO, TXT, SRV

timeout (ignored on Windows) – 超时时间(默认1秒)

count (ignored on Windows) – 重试次数 (默认值2)

2、net.if.in[if,<mode>]

网卡入口流量

if – 网卡名称

mode–可用值: bytes–字节数 (默认) packets–包数量 errors–错误数量 dropped–丢包数量

示例keys: net.if.in[eth0,errors]

3、net.if.out[if,<mode>]

网卡出口流量

if – 网卡名称

mode–可用值: bytes–字节数 (默认) packets–包数量 errors–错误数量 dropped–丢包数量

范例keys:net.if.out[eth0,errors] net.if.out[eth0]请使用增量存储方式

4、net.tcp.listen[port]

检测端口是否开启  

port –TCP端口    0–未监听   1–监听中

示例:net.tcp.listen[80]

5、net.tcp.port[<ip>,port]

是否可以连接到指定的TCP端口     

ip – IP地址(默认是 127.0.0.1)port–端口  0–无法连接  1–可以连接

范例:net.tcp.port[,80]检测web服务器端口是否运行中

6、net.udp.listen[port]

检测UDP端口是否在监听

port –udp端口   0 – 未监听  1 – 监听中

范例:net.udp.listen[68]

7、net.tcp.service[ssh]

检测ssh服务


zabbix 变量

{EVENT.ID}:

{HOST.NAME}14.192.66.36_xsg_malai   可见的名称

{IPADDRESS}:119.29.101.65

{DATE} {TIME}:2016.09.09 18:00:37

{TRIGGER.NAME}:PROBLEM / OK

{TRIGGER.STATUS}:1 min Processor load is too high on 119.29.101.65_GAME

{TRIGGER.SEVERITY}:

{ITEM.KEY1}:{ITEM.VALUE1}:system.cpu.load[percpu,avg1]:16.75

2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}:也可定义为1


内容还有待完善,逐渐积累中。。。。。。。。