自学Zabbix3.5.3-监控项item-zabbix agent 类型所有key
1. 温习
Zabbix server是Zabbix软件的中心进程。
- Server执行polling和trapping来采集数据,评估是否触发触发器,发送报警给用户。它是Zabbix agent和proxy用来报告关于系统可用性和完整性数据的中心组件,Server也可以通过简单服务检查(simple service check)来完成远程网络服务检测。
- Server是所有配置、统计和操作数据的中心存储仓库,也是在所有的监控系统中扮演故障发生时通知管理员的角色
- 基础Zabbix server依据功能不同划分为三个部分,分别为: Zabbix server、web前端及数据库。
- 由于Zabbix的所有的配置信息保存在数据库中,server和web前端可以直接进行操作。比如,通过web前端(或者API)创建一个新的监控项时,它将创建的数据插入数据库。一分钟左右Zabbix server会查询监控项数据表,并将查询的监控项 列表保存在自己的缓存(cache)中。这也是为什么通过Zabbix前端进行的变更将在两分钟左右生效。
Zabbix agent部署在被监控机器上用来监控本地资源和应用(如硬盘、内存、处理器统计等).
- Zabbix agent聚合本地的运行信息并将数据发送给Zabbix server以进一步处理. 一旦出现异常(如硬盘空间满的情况或者服务进行宕掉),Zabbix server将会发送告警给管理员报告本次异常.
- Zabbix agent利用本地系统调用完成统计信息收集,因此它非常的高效。
被动(passive)和主动(active)检查
Zabbix agent提供被动和主动检查方式:
- 被动检查模式中agent应答数据请求,Zabbix server或者proxy询问agent数据,如CPU load, 然后Zabbix agent回送结果给server.
- 主动检查模式处理过程将相对复杂. agent必须首先进行一次请求Zabbix server索取监控项列表,然后发送对应的值给server.
选择是被动还是主动检查,需要在监控性类型中选择’Zabbix agent’或者’Zabbix agent (active)’
- 被动:zabbix server向zabbix agent讨要数据。
- 主动:zabbix agent提交数据给zabbix server。
Zabbix代理(proxy)
- 通常用于替代server完成对多个监控设备收集监控信息并将数据发送给Zabbix server. 所有的收集数据会先存储在代理本地缓存中然后传送给Zabbix server.
- 代理是可选的,不过使用它可以有效的降低在分布式环境中单一的Zabbix server负载. 通过代理去收集收集,server可以有效降低CPU和磁盘I/O消耗.
- Zabbix代理可以出色的完成远程区域、分支机构、没有本地管理员的网络的集中监控.
- Zabbix代理使用独立的数据库
2. 监控项item 所有的key

| Key | Name |
|---|---|
| agent.hostname | Agent host name. Returns string |
| agent.ping | Agent availability check. Returns nothing - unavailable; 1 - available |
| agent.version | Version of Zabbix agent. Returns string |
| kernel.maxfiles | 系统支持的最大opened files. Returns integer |
| kernel.maxproc | 系统支持的最大进程数. Returns integer |
| net.dns[<ip>,name,<type>,<timeout>,<count>,<protocol>] | 检测DNS服务是否开启,0 – DNS挂了 1 – DNS运行中 ip – DNS服务器的ip地址(留空表示使用本地DNS, ignored on Windows) name – 需要测试的域名 type – 记录类型 (默认为 SOA ) 可选项 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>,name,<type>,<timeout>,<count>,<protocol>] | 执行一个DNS查询,获取DNS查询记录 ip – DNS服务器的ip地址(留空表示使用本地DNS, ignored on Windows) name – 需要测试的域名 type – 记录类型 (默认为 SOA ) 可选项 timeout (ignored on Windows) – 超时时间(默认1秒) count (ignored on Windows) – 重试次数 (默认值2) 示例key:net.dns.record[8.8.8.8,carlos.com,MX,2,1] |
| net.if.collisions[if] | Number of out-of-window collisions. Returns integer |
| net.if.in[if,<mode>] | 网卡入口流量,返回整数 if – 网卡名称 mode – 可用值如下: bytes – 字节数 (默认) packets – 包数量 errors – 错误数量 dropped – 丢包数量 示例keys: net.if.in[eth0,errors] net.if.in[eth0] |
| net.if.list | Network interface list (includes interface type, status, IPv4 address, description). Returns text |
| net.if.out[if,<mode>] | Outgoing traffic statistics on network interface. Returns integer |
| net.if.total[if,<mode>] | Sum of incoming and outgoing traffic statistics on network interface. Returns integer |
| net.tcp.listen[port] | 检测端口是否开启,0 – 未监听1 – 监听中 port- TCP端口 示例:net.tcp.listen[80] |
| net.tcp.port[<ip>,port] | 是否可以连接到指定的TCP端口,0 – 无法连接1 – 可以连接 ip – IP地址(默认是 127.0.0.1) port – 端口 |
| net.tcp.service[service,<ip>,<port>] | 检测服务是否开启,并且端口可用,0 – 服务挂了1 – 服务运行中 service – 如下: ssh, ntp, ldap, smtp, ftp, http, pop, nntp,imap, tcp, https, telnetip IP地址 (默认127.0.0.1) port – 端口 (默认情况为标准端口号) |
| net.tcp.service.perf[service,<ip>,<port>] | 检测服务器性能,0 – 服务挂了;seconds – 链接到服务器端口消耗的时间 service – 如下: ssh, ntp, ldap, smtp, ftp, http, pop, nntp,imap, tcp, https, telnetip IP地址 (默认127.0.0.1) port – 端口 (默认情况为标准端口号) |
| net.udp.listen[port] | Checks if this UDP port is in LISTEN state. Returns 0 - it is not in LISTEN state; 1 - it is in LISTEN state |
| net.udp.service[service,<ip>,<port>] | Checks if service is running and responding to UDP requests. Returns 0 - service is down; 1 - service is running |
| net.udp.service.perf[service,<ip>,<port>] | Checks performance of UDP service. Returns 0 - service is down; seconds - the number of seconds spent waiting for response from the service |
| perf_counter[counter,<interval>] | |
| proc.cpu.util[<name>,<user>,<type>,<cmdline>,<mode>,<zone>] | Process CPU utilisation percentage. Returns float |
| proc.mem[<name>,<user>,<mode>,<cmdline>,<memtype>] | 用户进程消耗的内存,内存使用量 (字节单位) name – 进程名 (默认值 “all processes”)user – 用户名 (默认值“all users”) mode – 可选值: avg, max, min, sum (默认) cmdline – 命令行过滤(正则表达时) |
| proc.num[<name>,<user>,<state>,<cmdline>] | 某用户某些状态的进程的数量 name – 进程名称 (默认“all processes”)user – 用户名 (默认 “all users”) state – 可用值: all (默认), run,sleep, zomb cmdline – 命令行过滤(正则表达时) |
| proc_info[process,<attribute>,<type>] | Different information about specific process(es). Returns float |
| sensor[device,sensor,<mode>] | 读取硬件传感器 device – 设备名称 sensor – 传感器名称 mode – 可选值: avg,max, min (if this parameter is omitted, device and sensor are treated verbatim).On Linux 2.4, 读取/proc/sys/dev/sensors. |
| service.info[service,<param>] | Information about a service. Returns integer with param as state, startup; string - with param as displayname, path, user; text - with param as description; Specifically for state: 0 - running, 1 - paused, 2 - start pending, 3 - pause pending, 4 - continue pending, 5 - stop pending, 6 - stopped, 7 - unknown, 255 - no such service; Specifically for startup: 0 - automatic, 1 - automatic delayed, 2 - manual, 3 - disabled, 4 - unknown |
| services[<type>,<state>,<exclude>] | Listing of services. Returns 0 - if empty; text - list of services separated by a newline |
| system.boottime | 系统启动时间戳. Returns integer (Unix timestamp) |
| system.cpu.intr | 设备中断. Returns integer |
| system.cpu.load[<cpu>,<mode>] | CPU负载,返回浮点数 cpu – 可用值: all (默认), percpu (所有在线cpu的负载) mode – 可用值: avg1 (1分钟 默认值), avg5(5分钟平均), avg15 (15分钟平均值) 范例system.cpu.load[,avg5] |
| system.cpu.num[<type>] | CPU的数量 |
| system.cpu.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分钟平均值) |
| system.hostname[<type>] | 系统返回主机名. Returns string |
| system.hw.chassis[<info>] | 返回机架信息. Returns string |
| system.hw.cpu[<cpu>,<info>] | 返回CPU信息. Returns string or integer cpu – cpu数量或者all (默认) info – full (默认), curfreq, maxfreq, model 或者vendor |
| system.hw.devices[<type>] | 列出PCI或者USB,返回文本值 |
| system.hw.macaddr[<interface>,<format>] | 列出MAC地址,返回字符串 interface – all (默认) 或者正则表达式 format – full (默认) 、short |
| system.localtime[<type>] | 系统时间,返回数字或者字符串; utc – (默认) (00:00:00 UTC, January 1, 1970) local – 本地时间格式 ‘yyyy-mm-dd,hh:mm:ss.nnn,+hh:mm’ |
| system.run[command,<mode>] | 在指定的主机上运行命令,返回文本 command – 命令 mode – wait (默认值, 执行超时时间), nowait (不等待) 最大可用返回512KB数据,包含空白数据。命令输出数据必须是文本 例如:system.run[ls -l /]– 列出/的文件和目录. 备注: 启用这个方法, agent配置文件必须配置 EnableRemoteCommands=1选项 |
| system.stat[resource,<type>] | System statistics. Returns integer or float |
| system.sw.arch | 返回软件信息. Returns string |
| system.sw.os[<info>] | 返回系统信息. Returns string |
| system.sw.packages[<package>,<manager>,<format>] | 已安装软件列表. Returns text package – all (默认)或者正则表达式manager – all (默认) or a package manager format – full (默认) ,short |
| system.swap.in[<device>,<type>] | 交换分区IN(磁盘交换到内存),返回数字 device – swap设备 (默认all) type – possible values: count (number of swapouts), sectors(sectors swapped out), pages (pages swapped out). See supported by platformfor details on defaults. |
| system.swap.out[<device>,<type>] | 内存到磁盘. Returns integer device – swap设备 (默认all) type – possible values: count (number of swapouts), sectors(sectors swapped out), pages (pages swapped out). See supported by platformfor details on defaults. |
| system.swap.size[<device>,<type>] | 交换分区大小,字节或者百分比 device – 交换分区 (默认值 all) type – possible values: 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.uname | 返回主机相信信息. Returns string |
| system.uptime | 系统运行时长(秒). Returns integer |
| system.users.num | 登陆用户数量. Returns integer |
| vfs.dev.read[<device>,<type>,<mode>] |
磁盘读取状态. 整数(如果type为如下): sectors,operations,bytes 浮点数(如果type为如下): sps, ops,bps |
| vfs.dev.write[<device>,<type>,<mode>] | 磁盘写入状态.整数(如下类型): sectors,operations,bytes 浮点型(如下类型): sps, ops,bps device – 磁盘设备 (默认值 “all”1)type – sectors, operations, bytes, sps, ops, bps (must specify exactly which parameter to use, since defaults are different under various OSes). sps, ops, bps means: sectors, operations, bytes per second respectively mode – one of avg1 (default),avg5 (average within 5 minutes), avg15. Note: The third parameter is supported only if the type is in: sps, ops, bps. |
| vfs.file.cksum[file] | 计算文件校验, calculated by the UNIX cksum algorithm. Returns integer 例如:vfs.file.cksum[/etc/passwd] 返回值: 1938292000 |
| vfs.file.contents[file,<encoding>] | 获取文本内容. Returns text file – 文件完整路径 例如:vfs.file.contents[/etc/passwd] |
| vfs.file.exists[file] | 检测文件是否存在,1 – 文件/硬链接/软连接文件存在 0 – 不存在 file – 文件完整路径 例如:vfs.file.exists[/tmp/application.pid] |
| vfs.file.md5sum[file] | 文件MD5校验码. 文件MD5哈希值 file – 完整路径 示例:vfs.file.md5sum[/usr/local/etc/zabbix_agentd.conf] 返回值b5052decb577e0fffd622d6ddc017e82 |
| vfs.file.regexp[file,regexp,<encoding>,<start line>,<end line>,<output>] | 文件中搜索字符串,包含字符串的行,或者为空
file – 文件完整路径regexp – GNU正则表达encoding – 编码 |
| vfs.file.regmatch[file,regexp,<encoding>,<start line>,<end line>] |
文件中搜索字符串,0表示未找到1表示找到 |
| vfs.file.size[file] | File size (in bytes). Returns integer |
| vfs.file.time[file,<mode>] | File time information. Returns integer (Unix timestamp) |
| vfs.fs.inode[fs,<mode>] | inode数量,返回数字; float for percentage fs – 文件系统 mode – total (默认), free, used, pfree (空闲百分比), pused (使用百分比) |
| vfs.fs.size[fs,<mode>] | 磁盘大小,返回字节; float for percentage fs – 文件系统 mode – total (默认), free, used, pfree (空闲百分比), pused (使用百分比) 返回本地文件系统的使用量 例如: vfs.fs.size[/tmp,free] |
| vm.memory.size[<mode>] | 内存大小,字节或者百分比; float for percentage mode – total (默认), active, anon, buffers, cached, exec, file, free, inactive, pinned, shared, wired, used, pused, available, available其中挑一个 允许三种类型的参数 第一类:包含total – 总内存 第二类: 系统指定内存类型:active, anon, buffers, cached, exec, file, free, inactive,pinned, shared, wired. 第三类:用户级别,一共使用了多少内存,还有多少内存可用: used, pused, available,pavailable. |
| vm.vmemory.size[<type>] | |
| web.page.get[host,<path>,<port>] | 获取网页内容,网页的源代码.返回空字符串表示失败Returns web page source as text host – 主机名 path – html文件路径 (默认值 /) port – 端口 (默认80) 示例:web.page.get[www.carlos.com,/,80] |
| web.page.perf[host,<path>,<port>] | 获取完全加载网页消耗的时间,秒. 返回0表示失败 host – 主机名 path – html文件路径 (默认值 /) port – 端口 (默认80) 示例:web.page.get[www.carlos.com,/,80] |
| web.page.regexp[host,<path>,<port>,<regexp>,<length>,<output>] |
在网页中搜索字符串,失败返回空字符表示不匹配. Returns the matched string, or as specified by the optional output parameter |
| wmi.get[<namespace>,<query>] | Execute WMI query and return the first selected object. Returns integer, float, string or text (depending on the request) |
自学Zabbix3.5.3-监控项item-zabbix agent 类型所有key的更多相关文章
- (12)zabbix agent 类型所有key
zabbix服务器端通过与zabbix agent通信来获取客户端服务器的数据,agent分为两个版本,其中一个是主动一个是被动,在配置主机我们可以看到一个是agent,另一个是agent(activ ...
- 自学Zabbix3.5.2-监控项item-types监控类型
自学Zabbix3.5.2-监控项item-types监控类型 1. item types item types是由zabbix提供的各种类型的检查器,大致就是Zabbix agent, Simple ...
- 自学Zabbix4.2 web监控项创建+item详解
自学Zabbix4.2 web监控项创建+item详解 1. web监控项创建 1.1 Scenario 选项卡 Name: 监控项的名称 Application: 放到哪个应用中 Authenti ...
- (9)zabbix创建监控项item
1. 创建监控项 点击配置(configuration)->主机(Hosts)->在你要配置的主机一栏上点击Items->点击create item.具体看截图,各个参数我都已经标注 ...
- 自学Zabbix3.5.1-监控项item-key介绍
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 自学Zabbix3.5.1-监控项item-key介绍 个人觉得艰难理解,故附上原文档:https ...
- 自学Zabbix3.5.1-监控项item-key详解
自学Zabbix3.5.1-监控项item-key详解个人觉得艰难理解,故附上原文档:https://www.zabbix.com/documentation/3.0/manual/config/it ...
- 自学Zabbix3.5.3-监控项item-key
1. 温习 Zabbix server是Zabbix软件的中心进程. Server执行polling和trapping来采集数据,评估是否触发触发器,发送报警给用户.它是Zabbix agent和pr ...
- 08 Zabbix Item类型之Zabbix agent类型
点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 08 Zabbix Item类型之Zabbix agent类型 Zabbix agent类型的item是使用部署在服务器端的age ...
- (8)zabbix监控项item是什么
什么是item Items是从主机里面获取的所有数据.通常情况下我叫itme为监控项,例如服务器加入了zabbix监控,我需要监控它的cpu负载,那么实现这个方法的东西就叫item item构成 it ...
随机推荐
- python_分布式进程中遇到的问题
看文档学习分布式进程中遇到了一下问题,文档里面例题是python2.X,我用的python3.x,就出现了一下莫名奇妙的问题,最终版代码先呈上: taskManager.py # coding:utf ...
- HO引擎近况20190110
前两天更新完,挺兴奋 趁着兴奋把虚拟机里面的MACOSX从10.12.6升级到了10.14 然后装XCODE,虽然比较熟悉了,但是架不住慢啊 先下载了一个DMG的镜像文件,用不了,转成ISO也不行 然 ...
- 大数据入门第十六天——流式计算之storm详解(一)入门与集群安装
一.概述 今天起就正式进入了流式计算.这里先解释一下流式计算的概念 离线计算 离线计算:批量获取数据.批量传输数据.周期性批量计算数据.数据展示 代表技术:Sqoop批量导入数据.HDFS批量存储数据 ...
- Django Rest Framework源码剖析(二)-----权限
一.简介 在上一篇博客中已经介绍了django rest framework 对于认证的源码流程,以及实现过程,当用户经过认证之后下一步就是涉及到权限的问题.比如订单的业务只能VIP才能查看,所以这时 ...
- #20155232《网络对抗》Exp9 Web安全基础
20155232<网络对抗>Exp9 Web安全基础 本实践的目标理解常用网络攻击技术的基本原理.Webgoat实践下相关实验. 实验过程 WebGoat Webgoat是OWASP组织研 ...
- tensorflow batch
这两天一直在看tensorflow中的读取数据的队列,说实话,真的是很难懂.也可能我之前没这方面的经验吧,最早我都使用的theano,什么都是自己写.经过这两天的文档以及相关资料,并且请教了国内的师弟 ...
- 微信小程序之分享或转发功能(自定义button样式)
小程序页面内发起转发 通过给 button 组件设置属性open-type="share",可以在用户点击按钮后触发 Page.onShareAppMessage 事件,如果当前页 ...
- python数据图形化—— matplotlib 基础应用
matplotlib是python中常用的数据图形化工具,用法跟matlab有点相似.调用简单,功能强大.在Windows下可以通过命令行 pip install matplotlib 来进行安装. ...
- 关于UGUI不拦截射线的方法
起因:开发游戏,要在设置界面里给一个设置项添加一个东西解释这个项是干啥的,要求鼠标移到文字上的时候显示一个弹窗差不多的东西,见动图,鼠标移开会消失.但是当我移动鼠标到弹窗上的时候,UGUI会发射一根射 ...
- Apache Ignite 学习笔记(一): Ignite介绍、部署安装和REST/SQL客户端使用
Apache Ignite 介绍 Ignite是什么呢?先引用一段官网关于Ignite的描述: Ignite is memory-centric distributed database, cachi ...