zabbix服务器端通过与zabbix agent通信来获取客户端服务器的数据,agent分为两个版本,在配置主机我们可以看到一个是agent,另一个是agent(active)。

agent:zabbix server向zabbix agent讨要数据。
agent(active):zabbix agent提交数据给zabbix server

监控项keys列表

以下表格是zabbix agent所支持的所有key列表,添加一向监控的时候,首先想到的应该是zabbix agent是否已经有相关的key存在,而不是自己去写脚本来获取key。

agent.hostname
返回被监控端名称(字符串)
agent.ping
检测被监控端是否存活(1:运行中 其他:未运行)-使用函数 nodata()检测客户端是否正在运行
agent.version
zabbix agent版本字符串
kernel.maxfiles
系统支持最大的open files整数
kernel.maxproc
系统支持最大的进程数量整数
log[file,<regexp>,<encoding>,<maxlines>,<mode>,<output>]
监控日志文件
file - 文件详细路径
regexp - 正则
encoding - 编码
maxlines - zabbix agent向server或者proxy发送最大的行数。
  这个参数覆盖配置文件zabbxi_agentd.conf中的’MaxLinesPerSecond’  
mode - 可选值:all (默认), skip (跳过处理老数据).mode参数从2.0版本开始支持
output - 可选项,输出格式模板.
示例: log[/var/log/syslog] log[/var/log/syslog,error] log[/home/zabbix/logs/logfile,,,100]
logrt[file_pattern,<regexp>,<encoding>,<maxlines>,<mode>,<output>]
Monitoring of log file with log rotation support.
file_pattern - 文件绝对路径
 
net.dns[<ip>,zone,<type>,<timeout>,<count>]
检测DNS服务是否开启0 – DNS挂了  1 - DNS运行中
ip - DNS服务器的ip地址(留空表示使用本地DNS, ignored onWindows)
zone - 需要测试的域名
type - 记录类型 (默认为 SOA),type可选值:  ANY, A, NS, CNAME, MB, MG, MR, PTR, MD, MF, MX, SOA, NULL, WKS (除了windows), HINFO, MINFO, TXT, SRV SRV
timeout (ignored on Windows) – 超时时间(默认1秒)
count (ignored on Windows) – 重试次数 (默认值2)
示例key: net.dns[8.8.8.8,zabbix.com,MX,2,1]  
net.dns.record[<ip>,zone,<type>,<timeout>,<count>]
执行一个DNS查询获取DNS查询数据.
ip - DNS服务器的ip地址(留空表示使用本地DNS, ignored on Windows)
zone - 需要测试的域名
type - 记录类型 (默认SOA,可选值同net.dns)
timeout (ignored on Windows) – 超时时间(默认1秒)
count (ignored on Windows) – 重试次数 (默认值2)
示例key: net.dns.record[8.8.8.8,ttlsa.com,MX,2,1]
net.if.collisions[if]
Out-of-window collision.Number of collisions. Integer.if - 网卡
net.if.discovery
列出网卡.通常用于低级别的discovery.JSON对象
net.if.in[if,<mode>]
网卡入口流量整数.
if - 网卡名称
mode - 可用值: bytes - 字节数 (默认)
packets - 包数量
errors - 错误数量
dropped - 丢包数量
示例keys: net.if.in[eth0,errors] net.if.in[eth0]
net.if.out[if,<mode>]
网卡出口流量(参数参见net.if.in)
net.if.total[if,<mode>]
网卡进/出流量的总和(参数参见net.if.in)
net.tcp.listen[port]
检测端口是否开启0 – (not listen) 1 –  in LISTEN stateport
示例: net.tcp.listen[80]
net.tcp.port[<ip>,port]
是否可以连接到指定的TCP端口0 – cannot connect 1 – can connect
   ip - IP地址(默认是 127.0.0.1)
   port - 端口
范例: net.tcp.port[,80] 检测web服务器端口是否运行中
net.tcp.service[service,<ip>,<port>]
检测服务是否开启,并且端口可用0 – 服务挂了 1 – 服务运行中
    service - 如下:ssh, ntp, ldap, smtp, ftp, http, pop, nntp,imap, tcp, https, telnet
    ip - IP地址 (默认127.0.0.1)
    port - 端口 (默认情况为标准端口号)
示例key: net.tcp.service[ftp,,45]
net.tcp.service.perf[service,<ip>,<port>]
检测服务器性能0 – 服务挂了; seconds – 链接到服务器端口消耗的时间
service - 如下:ssh, ntp, ldap, smtp, ftp, http, pop, nntp,imap, tcp, https, telnet
ip - IP地址 (默认127.0.0.1)
port - 端口 (默认情况为标准端口号)
示例key: net.tcp.service.perf[ssh]
         net.udp.listen[port]
proc.mem[<name>,<user>,<mode>,<cmdline>]
用户进程消耗的内存内存使用量 (字节单位).
name - 进程名 (默认值 “all processes”)
user - 用户名 (默认值“all users”)
mode - 可选值: avg, max, min, sum (默认)
cmdline - 命令行过滤(正则表达时)
示例keys: proc.mem[,root] – root的进程消耗了多少内存
    proc.mem[zabbix_server,zabbix] – zabbix用户运行的zabbix_server使用了多少内存
    proc.mem[,oracle,max,oracleZABBIX]
proc.num[<name>,<user>,<state>,<cmdline>]
某用户某些状态的进程的数量进程数量
name - 进程名称 (默认“all processes”)
user - 用户名 (默认 “all users”)
state - 可用值: all (默认), run,sleep, zomb
cmdline - 命令行过滤(正则表达时)
示例keys: proc.num[,mysql] – MySQL用户运行的进程数量
proc.num[apache2,www-data] – www-data运行了多少个apache2进程
proc.num[,oracle,sleep,oracleZABBIX]
备注:Windows系统只支持name和user两个参数
sensor[device,sensor,<mode>]
读取硬件传感器
device - 设备名称  
sensor - 传感器名称  
mode - 可选值:avg, max, min
示例key: sensor[w83781d-i2c-0-2d,temp1] Prior to Zabbix 1.8.4, the sensor[temp1] format was used. On Linux 2.6+, 读取/sys/class/hwmon. On OpenBSD, 读取hw.sensors MIB.示例keys: sensor[cpu0,temp0] – CPU0的温度 sensor[cpu[0-2]$,temp,avg] – cpu平均温度Zabbix 1.8.4开始支持OpenBSD
system.boottime
系统启动的时间戳整数.unix时间戳
system.cpu.intr
设备中断整数
system.cpu.load[<cpu>,<mode>]
CPU负载浮点数
cpu - 可用值: all (默认), percpu (所有在线cpu的负载)
mode - 可用值:avg1 (1分钟 默认值), avg5(5分钟平均), avg15 (15分钟平均值)
范例key: system.cpu.load[,avg5]
system.cpu.num[<type>]
CPU数量处理器个数type - 可用值: online (默认值), max范例: system.cpu.num
system.cpu.switches
上下文交换交换次数老命名方式: system[switches]
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[0,user,avg5]
system.hostname[<type>]
返回主机名字符串
type (仅用于windows系统) – 可用值: netbios(默认) or host
system.hw.chassis[<info>]
返回机架信息字符串
info - full (默认), model, serial, type 或vendor
例如: system.hw.chassis
Hewlett-Packard HP Pro 3010 Small Form Factor PC CZXXXXXXXX Desktop]
备注:要root权限,因为这些信息是从内存中读取的。
system.hw.cpu[<cpu>,<info>]
返回CPU信息字符/数字
cpu - cpu数量或者all (默认)
info - full (默认), curfreq, maxfreq, model 或者vendor
例如: system.hw.cpu[0,vendor] AuthenticAMD 从/proc/cpuinfo、/sys/devices/system/cpu/[cpunum]/cpufreq/cpuinfo_max_freq获取信息. 如果指定了CPU数量和 curfreq或者maxfreq, 将会返回数值(Hz).
system.hw.devices[<type>]
列出PCI或者USB文本值
type - pci (默认) or usb
范例: system.hw.devices[pci] 00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge [..] 返回lspci或者lsusb (不带参数)
system.hw.macaddr[<interface>,<format>]
列出MAC地址字符串
interface - all (默认) 或者正则表达式
format - full (默认) 、short
范例: system.hw.macaddr["eth0$",full] [eth0] 00:11:22:33:44:55 列出指定接口mac地址 如果format指定为short,MAC地址相同的将会被忽略掉
system.localtime[<type>]
系统时间.数字或者字符串
system.run[command,<mode>]
在制定的主机上运行命令文本
command - 命令
mode - wait (默认值, 执行超时时间), nowait (不等待)最大可用返回512KB数据,包含空白数据。 命令输出数据必须是文本
例如: system.run[ls -l /] – 列出/的文件和目录.
Note: 启用这个方法, agent配置文件必须配置 EnableRemoteCommands=1选项
system.stat[resource,<type>]
虚拟内存状态数字ent
system.sw.arch
返回软件信息字符串
范例: system.sw.arch i686
system.sw.os[<info>]
返回系统信息字符串
info - full (default), short ,name
范例: system.sw.os[short] Ubuntu 2.6.35-28.50-generic 2.6.35.11
信息来自如下文件:
/proc/version [short]
/proc/version_signature [name]
/etc/issue.net
system.sw.packages[<package>,<manager>,<format>]
已安装软件列表文本值
package - all (默认)或者正则表达式
manager - all (默认) or a package manager
format - full (默认) ,short
范例: system.sw.packages[mini,dpkg,short]
system.swap.in[<device>,<type>]
交换分区IN(磁盘交换到内存)数字
device - 交换分区设备 (默认all)
type - 可选值: count (swapins数量), sectors(sectors swapped in), pages (pages swapped in).
示例key: system.swap.in[,pages]
数据采集自: Linux 2.4: /proc/swaps, /proc/partitions, /proc/stat
            Linux 2.6: /proc/swaps, /proc/diskstats, /proc/vmstat
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]
数据采集自: Linux 2.4: /proc/swaps, /proc/partitions, /proc/stat
            Linux 2.6: /proc/swaps, /proc/diskstats, /proc/vmstat
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百分比
system.uname
返回主机相信信息.字符串
system.uptime
系统运行时长(秒)多少秒使用s/uptime来获取
system.users.num
登陆用户数量多少用户agent使用who命令获取
vfs.dev.read[<device>,<type>,<mode>]
磁盘读取状态整数,浮点数(如果type为如下)
device - 磁盘设备 (默认值 “all”)  
type - 可选值:sectors, operations, bytes, sps, ops, bps(必须指定, 不同操作系统下不同).  sps, ops, bps stand for: sectors, operations, bytes per second, respectively
mode - 可选值: avg1, avg5, avg15.  
备注: 只有type为sps, ops, bps的时候,第三个参数才被支持。
不同操作系统的TYPE参数: FreeBSD – bps Linux – sps OpenBSD – operations Solaris – bytes
示例key: vfs.dev.read[,operations]
vfs.dev.write[<device>,<type>,<mode>]
磁盘写入状态整数,
device - 磁盘设备 (默认 all)  
type - sectors, operations, bytes, sps, ops, bps
mode - one of avg1 (default),avg5 , avg15.
example: vfs.dev.write[,operations] Old naming: io

 
vfs.file.cksum[file]
计算文件校验 UNIX cksum.
file - 文件完整路径
vfs.file.contents[file,<encoding>]
获取文本内容若为空,只返回 LF/CR characters.
file - 文件完整路径
例如: vfs.file.contents[/etc/passwd] 文件不可以超过64KB.  
vfs.file.exists[file]
检测文件是否存在1 – 存在 0 – 不存在
    file - 文件完整路径
vfs.file.md5sum[file]
文件MD5校验码文件MD5哈希值
file - 完整路径
vfs.file.regexp[file,regexp,<encoding>,<start line>,<end line>,<output>]
文件中搜索字符串包含字符串的行,或者为空
file - 文件完整路径
regexp - GNU正则表达式
encoding - 编码
start line - 从哪一行开始,默认第一行
end line - %��

�eo*�j7�aq�jL�jk���/ʮ

如: vfs.file.regexp[/etc/passwd,zabbix] 
    vfs.file.regexp[/path/to/some/file,”([0-9]+)$”,,3,5,\1]
    vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1]
vfs.file.regmatch[file,regexp,<encoding>,<start line>,<end line>]
文件中搜索字符串0 – 未找到 1 – 找到
file - 文件完整路径
regexp - GNU 正则表达式
encoding - 编码
start line - 哪行开始,默认第一行
end line - 哪行结束,默认最后一行
例如: vfs.file.regmatch[/var/log/app.log,error]
vfs.file.size[file]
文件大小字节fzabbix必须有可读此文件的权限
vfs.file.time[file,<mode>]
文件时间信息Unix 时间戳.
mode -  modify (默认, 修改时间), access – 最后访问时间, change – 最后改变时间
例如: vfs.file.time[/etc/passwd,modify] 备注:文件大小有限制
vfs.fs.discovery
列出挂载的文件系统 用于lld.JSON对象
vfs.fs.inode[fs,<mode>]
inodes数量数字
fs - 文件系统
mode - total (默认), free, used, pfree (空闲百分比), pused (使用百分比)
例如: vfs.fs.inode[/,pfree]
vfs.fs.size[fs,<mode>]
磁盘空间,返回本地文件系统的使用量字节
fs - 文件系统
mode -  total (默认), free, used, pfree (空闲百分比), pused (使用百分比).
例如: vfs.fs.size[/tmp,free]
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.
web.page.get[host,<path>,<port>]
获取网页内容网页源代码
host - 主机名/域名
path - 文件地址,默认/
port - 端口,默认80返回空字符串表示失败. 例如: web.page.get[
web.page.perf[host,<path>,<port>]
获取完全加载网页消耗的时长秒,返回0表示失败
host - 主机名/域名
path - html地址,默认是/
port - 端口,默认80
web.page.regexp[host,<path>,<port>,<regexp>,<length>,<output>]
在网页中搜索字符串  失败则返回空字符 (不匹配).
host - 主机名
path - html文件路径 (默认值 /)
port - 端口 (默认80)
regexp - GNU正则表达式
length - 返回的最大的字符串数量

output - 输出格式模板可选项.

zabbix agent 类型自带的key的更多相关文章

  1. 08 Zabbix Item类型之Zabbix agent类型

    点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 08 Zabbix Item类型之Zabbix agent类型 Zabbix agent类型的item是使用部署在服务器端的age ...

  2. (12)zabbix agent 类型所有key

    zabbix服务器端通过与zabbix agent通信来获取客户端服务器的数据,agent分为两个版本,其中一个是主动一个是被动,在配置主机我们可以看到一个是agent,另一个是agent(activ ...

  3. 自学Zabbix3.5.3-监控项item-zabbix agent 类型所有key

    点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 1. 温习       Zabbix server是Zabbix软件的中心进程. Server执行 ...

  4. (37)zabbix snmp类型 无需安装agent也能监控

    概述 如果我们需要监控打印机.路由器.UPS等设备,肯定不能使用zabbix agentd,因为他们不能安装软件的,还好他们一般都支持SNMP协议,这样我可以使用SNMP来监控他们.如果你希望使用SN ...

  5. 15 Zabbix Item类型之Zabbix trapper类型

    点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 15 Zabbix Item类型之Zabbix trapper类型 zabbix获取数据时有时会出 ...

  6. zabbix 二 zabbix agent 客户端

    [root@zabbix_agent src]# cd zabbix-3.0.3 [root@zabbix_agent zabbix-3.0.3]# ls aclocal.m4 bin ChangeL ...

  7. zabbix agent安装详解

    安装 Installing repository configuration package Zabbix 2.2 for RHEL5, Oracle Linux 5, CentOS 5: rpm - ...

  8. Zabbix Agent端配置文件说明

    Zabbix Agent端配置文件说明 由于工作中经常接触到zabbix,所以将agent配置整理一下,方便日常查看. # This is a config file for the Zabbix a ...

  9. Zabbix Agent active主动模式监控

    zabbix_server端当主机数量过多的时候,由Server端去收集数据,Zabbix会出现严重的性能问题,主要表现如下: 1.当被监控端到达一个量级的时候,Web操作很卡,容易出现502 2.图 ...

随机推荐

  1. PHP不到100行代码实现SSO单点登录

    1.点击登录跳转到SSO登录页面并带上当前应用的callback地址2.登录成功后生成COOKIE并将COOKIE传给callback地址3.callback地址接收SSO的COOKIE并设置在当前域 ...

  2. shell中&&和||的使用方法_转

    shell中&&和||的使用方法 &&运算符:   command1  && command2   &&左边的命令(命令1)返回真(即返 ...

  3. SWIFT 闭包的简单使用

    import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: ...

  4. qunit.js初试

    看了下mbraak-simple-data-grid写的单元测试,感觉还是很好入手的 用module函数定义模块 用test函数定义测试方法 用equal.ok(判断是否为真)等方法做断言判断 用se ...

  5. R语言putty中直接使用X11(Xming)绘图

    1.下载Xming地址 http://pan.baidu.com/s/1o6ilisU,安装,推荐默认安装在C盘,推荐快捷方式放在与putty快捷方式同一个文件夹: 2.打开putty,在SSH的X1 ...

  6. PostgreSQL Replication之第十一章 使用Skytools(5)

    11.5 关于walmgr 的介绍 walmgr 是一个简化基于文件事务日志传输的工具.早在过去的一些日子里(在9.0版本之前),使用walmgr来简化基本备份是很常见的.随着流复制的引入,情况有了一 ...

  7. codeforces.com/problemset/problem/213/C

    虽然一开始就觉得从右下角左上角直接dp2次是不行的,后面还是这么写了WA了 两次最大的并不一定是最大的,这个虽然一眼就能看出,第一次可能会影响第二次让第二次太小. 这是原因. 5 4 32 1 18 ...

  8. ACM/ICPC竞赛

    ACM知识点分类   第一类:基础算法 (1) 基础算法:枚举,贪心,递归,分治,递推,构造,模拟 (2) 动态规划:背包问题,树形dp,状态压缩dp,单调性优化,插头dp (3) 搜索:dfs,bf ...

  9. UML: 序列图

    摘自http://www.umlonline.org/school/thread-37-1-1.html 大家都进过餐馆吃饭吧?你是如何和餐厅服务员“眉来眼去”的呢?回忆一下从你进餐馆开始到你离开餐馆 ...

  10. maven的中传递依赖,maven的依赖管理(转)

    在maven的pom文件中 <dependencies> <dependency> <groupId>junit</groupId> <artif ...