5.02021-11-21T21:36:14ZHalley templateHalley Linux Disk_iostatHalley Linux Disk_iostat## Overview
Template for monitoring Linux Disk with iostat with explanations and advices.
Use LLD discovery: discover only [hsv]d[a-z]
The idea is from <https://wiki.enchtex.info/howto/zabbix/zabbix_iostat_monitoring>
I edited the script and add explanations and advises to the template
Script write data in a cache file to not make a lot of requests
To install: follow instructions from <https://cloud.mail.ru/public/6LpD/qkVgL4E8z>
Any recommends are welcome
## Author
Tudor Ticau
Halley templateIostatIOSTAT: Hard disk drive discoveryiostat[]601diostat: Avg queue length on $2iostat[avgqu,{#HDNAME}]607dFLOATreqThe average queue length of the requests that were issued to the device. - Average Queue Lenght. Usual is 2 per physical disk. So, if we have 5 disks, an average queue lenght under 10 is fineIostatiostat: Avg queue size on $2iostat[avgrq,{#HDNAME}]607dFLOATBThe average queue size of the requests that were issued to the device. Is calculated in sectors*512 (usual size of a sector in Unix)IostatMULTIPLIER512iostat: I/O latency on $2iostat[await,{#HDNAME}]607dFLOATmsThe average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them. In other words I/O time for complete a process (read the disk, change data, write in disk) - (SSD usually is under 5 ms, HDD 100 ms )Iostat{avg(120)}>200Disk: {#HDNAME} I/O latency highAVERAGEDisk transfer time for an I/O operations take over 200 ms to execute. This can be a problem for your disk performance. Consider that an SSD must complete an I/O req in < 5 ms, and a HDD < 150 msYESValue{ITEM.VALUE}iostat: Read I/O latency on $2iostat[rawait,{#HDNAME}]607dFLOATmsThe average time (in milliseconds) for read I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them. (SSD usually is under 1 ms, HDD 30 ms )Iostatiostat: KBps $1 on $2iostat[read,{#HDNAME}]607dFLOATBpsThe total number of kilobytes read per second. SSD has until 400 Mb/s, HDD until 60 Mb/sIostatCHANGE_PER_SECONDMULTIPLIER1024iostat: Merged read IOPS on $2iostat[rrqm,{#HDNAME}]607dFLOATreq/sThe number of read requests merged per second that were queued to the device.
Reads and writes which are adjacent to each other may be merged for efficiency. Thus two 4K reads may become one 8K read before it is ultimately handed to the disk, and so it will be counted (and queued) as only one I/O. This field lets you know how often this was done.Iostatiostat: Read IOPS on $2iostat[rs,{#HDNAME}]607dFLOATreqThe number of read requests that were issued to the device per second. In other words, how many IOPS per second are read. SSD can handle until 30 000 IOPS, HDD - 170Iostatiostat: Utilization % on $2iostat[util,{#HDNAME}]607dFLOAT%Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.Iostat{avg(120)}>90Disk: {#HDNAME} Utilization highHIGHSaturation (bandwidth utilization for the device). Device saturation occurs when this value is close to 100% and in this time device can't deserve CPU requests. Server is going very slowYESValue{ITEM.VALUE}iostat: Write I/O latency on $2iostat[wawait,{#HDNAME}]607dFLOATmsThe average time (in milliseconds) for write I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them. (SSD usually is under 4 ms, HDD 70 ms )Iostatiostat: KBps $1 on $2iostat[write,{#HDNAME}]607dFLOATBpsThe total number of kilobytes written per second. SSD has until 400 Mb/s, HDD until 60 Mb/sIostatCHANGE_PER_SECONDMULTIPLIER1024iostat: Merged write IOPS on $2iostat[wrqm,{#HDNAME}]607dFLOATreq/sThe number of write requests merged per second that were queued to the device.
Reads and writes which are adjacent to each other may be merged for efficiency. Thus two 4K reads may become one 8K read before it is ultimately handed to the disk, and so it will be counted (and queued) as only one I/O. This field lets you know how often this was done.Iostatiostat: Write IOPS on $2iostat[ws,{#HDNAME}]607dFLOATreqThe number of write requests that were issued to the device per second. In other words, how many IOPS per second are read. SSD can handle until 10 000 IOPS, HDD - 170Iostatiostat: {#HDNAME} Latency1A7C11- Halley Linux Disk_iostatiostat[await,{#HDNAME}]
iostat: {#HDNAME} TrafficFIXED009900- Halley Linux Disk_iostatiostat[read,{#HDNAME}]
1DD0000- Halley Linux Disk_iostatiostat[write,{#HDNAME}]
iostat: {#HDNAME} UtilizationFIXED00EEEE- Halley Linux Disk_iostatiostat[util,{#HDNAME}]
100DD00RIGHT- Halley Linux Disk_iostatiostat[rs,{#HDNAME}]
2FF6666RIGHT- Halley Linux Disk_iostatiostat[ws,{#HDNAME}]