Monitor a device performance on Linux with Zabbix

De Wiki de Romain RUDIGER
Aller à : navigation, rechercher

Description

This monitoring template is based on the '/proc/diskstats' and monitor these informations:

-Disk read/write latency in ms
-Disk read/write operation in ops
-Disk read/write rate in Bps
The items for sda
The last values of sda on a server
Graphic of the disk rate

Agent configuration

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}'
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}'

You can note that the io.ms and io.active are not used in the template.

Template

This template define the items for these device: sda, sdb, sdc, md1, md2. Adapt to your configuration.

Media:Zabbix-device_performance-template.xml

References

I found informations on these sites:

muck.net getting-hard-disk-performance-stats-from-zabbix
kernel.org iostats.txt
interpreting-proc-diskstats