How to monitor disk performance in Zabbix ? Many people want to see the disk performance of their servers. Currently the low-level discovery doesn’t work for vfs.dev.read/vfs.dev.write, please check : https://support.zabbix.com/browse/ZBXNEXT-1302
We have the solution, thanks “Grundic” for the share Templates and script, follow the instructions
- Do not forget to mark it executable,
# Diskstats user parameters config
sudo mkdir -p /etc/zabbix/zabbix_agentd.d/
sudo wget https://raw.githubusercontent.com/grundic/zabbix-disk-performance/master/userparameter_diskstats.conf -O /etc/zabbix/zabbix_agentd.d/userparameter_diskstats.conf
# Low-level discovery script
sudo wget https://raw.githubusercontent.com/grundic/zabbix-disk-performance/master/lld-disks.py -O /usr/local/bin/lld-disks.py
sudo chmod +x /usr/local/bin/lld-disks.py
After that restart zabbix-agent :
sudo service zabbix-agent restart
Go to Zabbix’s web interface, Configuration->Templates and import Template Disk Performance.xml, download Template Disk Performance from Github. After that you should be able to monitor disk activity for all your disks.
Please note, that items and graphs are created for each disk/partition individually using discovery script, so do not expect to find them under usual configuration — they would be in
Discovery rules section:
Low level discovery will list your RAID devices, and LVM volumes, but LVM volumes will be mapped with their device-mapper ID, not the pretty names.
Using without User Parameters
Zabbix have standard parameters for monitoring disk io:
vfs.dev.write with several types:
Template have this values configured, but disabled by default.
To test that everything work use zabbix_get (from some time this is in it’s own package, so do apt-get/yum install zabbix-get):
# view result of low level discovery
zabbix_get -s 127.0.0.1 -k custom.vfs.discover_disks
# view statistics for 'sda' disk
zabbix_get -s 127.0.0.1 -k custom.vfs.dev.write.sectors[sda]
Zabbix template for collecting IO statistics
With this template you can collect different disk statistics.