Skip to content

MogiePete/zabbix-disk-performance

 
 

Repository files navigation

zabbix-disk-performance

Zabbix template for collecting IO statistics

With this template you can collect different disk statistics.

![Bytes/Sec](https://github.com/grundic/zabbix-disk-performance/blob/master/images/sda_bytes_second.png?raw=true =250x) ![Merged](https://github.com/grundic/zabbix-disk-performance/blob/master/images/sda_merged.png?raw=true =250x) ![Ops/Sec](https://github.com/grundic/zabbix-disk-performance/blob/master/images/sda_ops_second.png?raw=true =250x) ![Overview](https://github.com/grundic/zabbix-disk-performance/blob/master/images/sda_overview.png?raw=true =250x)

Installation

To install, copy userparameter_diskstats.conf to /etc/zabbix/zabbix_agentd.d/userparameter_diskstats.conf and lld-disks.py to /usr/local/bin/lld-disks.py. 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

userparameter_diskstats.conf is user parameters for Zabbix. lld-disks.py is low level discovery script for enumerating disks of your system.

After that restart zabbix-agent sudo service zabbix-agent restart

Go to Zabbix's web interface, Configuration->Templates and import Template Disk Performance.xml. 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:

![Discovery Rules](https://github.com/grundic/zabbix-disk-performance/blob/master/images/discovery_rules.png?raw=true =250x)

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.read and vfs.dev.write with several types:

  • sectors
  • operations
  • sps
  • ops

Template have this values configured, but disabled by default.

Testing

To test that everything works use the zabbix_agentd -t to query the statistics :

# view result of low level discovery
zabbix_agentd -t "custom.vfs.discover_disks"
# view statistics for 'sda' disk
zabbix_agentd -t "custom.vfs.dev.write.sectors[sda]"

About

Zabbix template for collecting IO statistics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%