监控磁盘IO

1)vim /etc/zabbix/zabbix_agentd.conf
2)添加如下自定义监控

磁盘读的总数
UserParameter=custom.vfs.dev.read.ops[],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$4}'
磁盘读的毫秒数
UserParameter=custom.vfs.dev.read.ms[
],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$7}'
磁盘写的总数
UserParameter=custom.vfs.dev.write.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$8}'

磁盘写的毫秒数
UserParameter=custom.vfs.dev.write.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$11}'

花费在IO操作上的毫秒数
UserParameter=custom.vfs.dev.io.active[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$12}'

UserParameter=custom.vfs.dev.io.ms[],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$13}'
读扇区的次数
UserParameter=custom.vfs.dev.read.sectors[
],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$6}'
写扇区的次数
UserParameter=custom.vfs.dev.write.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$10}'

3)zabbix 配置web页面监控
列:读扇区的总数
UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$4}'

zabbix监控磁盘io

其他监控以此类推

相关文章:

  • 2021-07-03
  • 2021-12-02
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
猜你喜欢
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2021-12-02
相关资源
相似解决方案