Key
功能 返回值 参数 描述
agent.hostname



agent.ping




agent.version
zabbix agent版本 字符串 例如返回: 1.8.2
kernel.maxfiles
系统支持最大的openfiles 整数

kernel.maxproc
系统支持最大的进程数量 整数

log[file,,,,,]
监控日志文件 Log file – 文件详细路径regexp – 正则encoding – 编码


maxlines – zabbix agent向server或者proxy发送最大的行数。这个参数覆盖配置文件zabbxi_agentd.conf中的’MaxLinesPerSecond’

mode – 可选值: all (默认), skip (跳过处理老数据).mode参数从2.0版本开始支持

output – 可选项,输出格式模板. The \0 escape sequence is replaced with the matched text while an \N(where N=1…9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups).

Ifis left empty

– the whole line containing the matched text is returned. Note that all global regular expression types except ‘Result is TRUE’ always return the whole matched line and theparameter is ignored.

output是2.2中新加入的功能

这个监控项只能设置为 active check(主动模式).如果文件不存在或者没有相应的权限,那么监控项状态会转变为unsupported.示例:


log[/var/log/syslog] log[/var/log/syslog,error] log[/home/zabbix/logs/logfile,,,100]

logrt[file_pattern,,,,,]
监控支持轮转的日志 Log file_pattern – 文件绝对路径regexp – 正则表达式encoding – 编码


maxlines – 客户端每秒发送给server的最大行数. 这个参数会覆盖客户端配置文件zabbix_agentd.conf中MaxLinesPerSecond的值

mode – 可选值: all (默认), skip (跳过老数据的处理).

Mode参数从2.0开始支持

output – an optional output formatting template. The \0 escape sequence is replaced with the matched text while an \N(where N=1…9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). Ifis left empty – the whole line containing the matched text is returned. Note that all global regular expression types except ‘Result is TRUE’ always return the whole matched line and theparameter is ignored. The output parameter is supported from version 2.2.

The item must be configured as an active check. Log rotation is based on the last modification time of files.示例:logrt[“/home/zabbix/logs/^logfile[0-9]{1,3}$”,,,100]


– will match a file like “logfile1″ (will not match “.logfile1″)

 

logrt[“/home/user/logfile_.*_[0-9]{1,3}”,”pattern_to_match”,”UTF-8″,100]

– will collect data from files such “logfile_abc_1” or “logfile__001”.

net.dns[,zone,,,]
检测DNS服务是否开启 0 – DNS挂了 1 – DNS运行中 ip – DNS服务器的ip地址(留空表示使用本地DNS, ignored on Windows)zone – 需要测试的域名type– 记录类型 (默认为 SOA)


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

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

示例key:net.dns[8.8.8.8,zabbix.com,MX,2,1]type可选值: ANY, A, NS, CNAME, MB, MG, MR, PTR, MD, MF, MX, SOA, NULL, WKS (除了windows), HINFO, MINFO, TXT, SRV


SRV记录从Zabbix agent versions 1.8.6 (Unix) and 2.0.0 (Windows)开始支持Zabbix 2.0

之前的命名方式: net.tcp.dns(目前依旧支持)

net.dns.record[,zone,,,]
执行一个DNS查询 获取DNS查询数据 ip – DNS服务器的ip地址(留空表示使用本地DNS, ignored on Windows)zone – 需要测试的域名type– 记录类型 (默认为 SOA)


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

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

示例key:net.dns.record[8.8.8.8,ttlsa.com,MX,2,1]type的可选值: ANY, A, NS, CNAME, MB, MG, MR, PTR, MD, MF, MX, SOA, NULL, WKS (except for Windows), HINFO, MINFO, TXT, SRV


SRV记录从Zabbix agent versions 1.8.6 (Unix) and 2.0.0 (Windows)开始支持Zabbix 2.0

之前的命名方式: net.tcp.dns(目前依旧支持)

net.if.collisions[if]
Out-of-window collision Number of collisions 数字 if – 网卡
net.if.discovery
列出网卡. 通常用于低级别的discovery JSON对象
Zabbix agent 2.0开始支持 但是操作系统FreeBSD, OpenBSD and NetBSD上的 Zabbix agent 2.2开始支持
net.if.in[if,]
网卡入口流量 整数 if – 网卡名称mode – 可用值:bytes – 字节数 (默认)


packets – 包数量

errors – 错误数量

dropped – 丢包数量

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