Send statistic from /proc/diskstats to Zabbix
This is small project for my Home server
dm-1
but print for user vg00-lv_root
dm-1
may change to dm-2
, but stat will be correct# Create dir for zabbix sript
mkdir -p /usr/libexec/zabbix/
# Copy script to your server
curl 'https://raw.githubusercontent.com/dusharu/ZBX_Disk_Stat/master/scripts/disk_stat.sh' -o /usr/libexec/zabbix/disk_stat.sh
chmod 755 /usr/libexec/zabbix/disk_stat.sh
Graph create by Grafana and Zabbix plugin
Graph create by Zabbix
zabbix_get -s <HOST> -k 'system.run[ "/usr/libexec/zabbix/disk_stat.sh" ]'
zabbix_get -s <HOST> -k 'system.run[ "/usr/libexec/zabbix/disk_stat.sh blkdev_discovery" ]'
zabbix_get -s <HOST> -k 'system.run[ "/usr/libexec/zabbix/disk_stat.sh blkdev_all_stat <DISK>" ]'