监控项(item)是一个特定监控指标的相关的数据,这些数据来自于被监控对象,item是zabbix进行数据收集的核心,相对某个监控对象,每个item都由"key"标识。
默认的Items有多种类型:
1、网卡流量相关
net.if.in[if,<mode>]
net.if.out[if,<mode>]
net.if.total[if.<mode>]
if: 接口,如eht0
mode: bytes, packets, errors, dropped
2、端口相关
net.tcp.listen[port]
net.tcp.port[<ip>,port]
net.tcp.service[service,<ip>,<port>]
net.udp.listen[port]
3、进程相关:
kernel.maxfiles
kernel.maxproc
4、CPU相关:
system.cpu.intr
system.cpu.load[<cpu>,<mode>]
system.cpu.num[<type>]
system.cpu.switches
system.cpu.util[<cpu>,<type>,<mode>]
5、磁盘IO或文件系统相关:
vfs.dev.read[<device>,<type>,<mode>]
vfs.dev.write[<device>,<type>,<mode>]
vfs.fs.inode[fs,<mode>]
用户可以根据需要自定义监控项。
1、在客户端设备配置监控项
在/etc/zabbix/zabbix_agentd.d/目录下新建配置文件
UserParameter=keyValue,command
如UserParameter=ESTABLISHED,netstat -ant | grep -c ESTABLISHED
实现监控统计TCP 状态为ESTABLISHED的数量
2、在服务端添加自定义监控项
在配置-》主机页面单机监控项,进入监控项配置页面
进入创建监控项
查看监控项信息
原文:https://blog.51cto.com/12631595/2545879