Zabbix monitors disk I/O status
I. Monitoring Principles
Basic principle: monitors IO performance by analyzing the/proc/diskstats file. Explanation:
++'S explanation of/proc/diskstats ++
# Cat/proc/diskstats | grep sda | head-1
8 0 sda 73840 10263 3178156 91219 1110085 4192562 42423152 1275861 0 447798 1366379
The first to third domains are the master device number, secondary device number, and device name.
4th domains: Number of reads completed ----- Number of reads to the disk, total number of successful reads.
5th domains: the number of completed read operations, and 9th domains: the number of completed write operations. For efficiency, adjacent reads and writes may be merged. Therefore, two 4 K reads may become an 8 K read before being processed to the disk. Therefore, only one I/O operation is performed. This domain allows you to know how frequently such operations are performed.
6th domains: Number of read sectors, total number of successfully read sectors.
7th fields: the number of milliseconds consumed by reading, which is the number of milliseconds consumed by all read Operations (measured by _ make_request () to end_that_request_last ).
8th domains: number of completed writes-the number of completed writes and the total number of completed writes.
9th fields: number of completed write operations ----- number of completed write operations.
10th domains: Number of write sectors-Number of write sectors, total number of successful write sectors.
11th domains: the number of milliseconds the write operation takes-the number of milliseconds the write operation takes (measured by _ make_request () to end_that_request_last ).
12th fields: Number of input/output requests being processed -- the current progress of-I/O, only this field should be 0. When a request is handed over to the appropriate request_queue_t, the addition and request Completion Time are reduced.
13th fields: the number of milliseconds that an input/output operation takes-the number of milliseconds that an I/O operation takes. This field will increase as long as field 9 is not 0.
14th domains: Number of weighted milliseconds for input/output operations ----- weighted, number of milliseconds for I/O operations. At the beginning of each I/O operation, I/O ends, this field is added when I/O is merged. This provides a convenient measurement standard for I/O completion time and storage that can be accumulated.
++ ++
Ii. Configure the Key
The method described in this article is relatively simple, and the local disk is not automatically discovered. We assume that our device has two disks, sda and sdb, if your device is a single disk, you only need to disable the sdb Items. In the future, you will be able to automatically find the local disk.
# Vim/etc/zabbix/zabbix_agentd.conf
UserParameter = disk. read. ops [*], cat/proc/diskstats | grep $1 | head-1 | awk '{print $4 }'
UserParameter = disk. read. ms [*], cat/proc/diskstats | grep $1 | head-1 | awk '{print $7 }'
UserParameter = disk. write. ops [*], cat/proc/diskstats | grep $1 | head-1 | awk '{print $8 }'
UserParameter = disk. write. ms [*], cat/proc/diskstats | grep $1 | head-1 | awk '{print $11 }'
UserParameter = disk. io. active [*], cat/proc/diskstats | grep $1 | head-1 | awk '{print $12 }'
UserParameter = disk. io. ms [*], cat/proc/diskstats | grep $1 | head-1 | awk '{print $13 }'
UserParameter = disk. read. sectors [*], cat/proc/diskstats | grep $1 | head-1 | awk '{print $6 }'
UserParameter = disk. write. sectors [*], cat/proc/diskstats | grep $1 | head-1 | awk '{print $10 }'
Iii. Import Template
The template is in the attachment. download it.
------------------------------------------ Split line ------------------------------------------
Free in http://linux.bkjia.com/
The username and password are both www.bkjia.com
The specific download directory is in/July 6, 2015,/July 15, November,/Zabbix, which monitors the disk I/O status/
For the download method, see
------------------------------------------ Split line ------------------------------------------
Iv. Result Display
Some Zabbix Tutorials:
Compile and install Zabbix2.4.5 source code in Ubuntu 14.04
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy Zabbix in CentOS 6.3
Zabbix distributed monitoring system practice
Under CentOS 6.3, Zabbix monitors apache server-status
Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3
Install Zabbix 2.0.6 in 64-bit CentOS 6.2
ZABBIX details: click here
ZABBIX: click here
This article permanently updates the link address: