博主呓语:

Zabbix 3.0.2最新版添加硬盘IO监控

Posted by 破冰 on 2016-5-4 19:41 Wednesday

安装就不介绍了,教程一大堆,在zabbix_agentd.conf中增加 Include=/usr/local/zabbix/conf/zabbix_agentd/*.conf

/usr/local/zabbix/conf/zabbix_agentd/目录下新建userparameter_diskio.conf文件,内容如下:


UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats | egrep $1 | head -1 | awk '{print $$4}'
UserParameter=custom.vfs.dev.read.ms[*],cat /proc/diskstats | egrep $1 | head -1 | awk '{print $$7}'
UserParameter=custom.vfs.dev.write.ops[*],cat /proc/diskstats | egrep $1 | head -1 | awk '{print $$8}'
UserParameter=custom.vfs.dev.write.ms[*],cat /proc/diskstats | egrep $1 | head -1 | awk '{print $$11}'
UserParameter=custom.vfs.dev.io.active[*],cat /proc/diskstats | egrep $1 | head -1 | awk '{print $$12}'
UserParameter=custom.vfs.dev.io.ms[*],cat /proc/diskstats | egrep $1 | head -1 y| awk '{print $$13}'
UserParameter=custom.vfs.dev.read.sectors[*],cat /proc/diskstats | egrep $1 | head -1 | awk '{print $$6}'
UserParameter=custom.vfs.dev.write.sectors[*],cat /proc/diskstats | egrep $1 | head -1 | awk '{print $$10}'
重新启动zabbix_agentd客户端,客户端配置完成;

在zabbix_server服务端上导入模版,disk-io.xml 下载地址在这里;

然后zabbix后台直接导入模版,直接引用即可,也可以做下模版链接;效果如下图:

diskio.png


发表评论: