Zabbix 监控磁盘IO
1.数据获取脚本
#!/bin/bash
# resource: http://www.muck.net/19/getting-hard-disk-performance-stats-from-zabbix
# Author: Ca0gu0
# driver=$
args=$
case $args in
read_ops)
grep $driver /proc/diskstats | head - | awk '{print $4}'
;; "read_ms")
grep $driver /proc/diskstats | head - | awk '{print $7}'
;; "write_ops")
grep $driver /proc/diskstats | head - | awk '{print $8}'
;; "write_ms")
grep $driver /proc/diskstats | head - | awk '{print $11}'
;; "io_active")
grep $driver /proc/diskstats | head - | awk '{print $12}'
;; "io_ms")
grep $driver /proc/diskstats | head - | awk '{print $13}'
;; "read_sectors")
grep $driver /proc/diskstats | head - | awk '{print $6}'
;; "write_sectors")
grep $driver /proc/diskstats | head - | awk '{print $10}'
;; *)
echo "Not found data"
exit
;;
esac
2.效果如下