数据采集 采集源配置 diskio 指标采集
diskio 指标采集
简介
采集磁盘流量和时间指标到 DataFlux 中
前置条件
- 已安装 DataKit(DataKit 安装文档)
配置
进入 DataKit 安装目录下的 conf.d/host 目录,复制 diskio.conf.sample 并命名为 diskio.conf。示例如下:
# Read metrics about disk IO by device
[[inputs.diskio]]
## By default, telegraf will gather stats for all devices including
## disk partitions.
## Setting devices will restrict the stats to the specified devices.
# devices = ["sda", "sdb"]
## Uncomment the following line if you need disk serial numbers.
# skip_serial_number = false
#
## On systems which support it, device metadata can be added in the form of
## tags.
## Currently only Linux is supported via udev properties. You can view
## available properties for a device by running:
## 'udevadm info -q property -n /dev/sda'
## Note: Most, but not all, udev properties can be accessed this way. Properties
## that are currently inaccessible include DEVTYPE, DEVNAME, and DEVPATH.
# device_tags = ["ID_FS_TYPE", "ID_FS_USAGE"]
#
## Using the same metadata source as device_tags, you can also customize the
## name of the device via templates.
## The 'name_templates' parameter is a list of templates to try and apply to
## the device. The template may contain variables in the form of '$PROPERTY' or
## '${PROPERTY}'. The first template which does not contain any variables not
## present for the device is used as the device name tag.
## The typical use case is for LVM volumes, to get the VG/LV name instead of
## the near-meaningless DM-0 name.
# name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"]
配置好后,重启 DataKit 即可生效
采集指标
fields:
指标 | 描述 | 类型 |
---|---|---|
reads | 读取的次数 | integer |
writes | 写入的次数 | integer |
read_bytes | 读取的字节数 | integer |
write_bytes | 写入的字节数 | integer |
read_time | 等待读取的时间(毫秒) | integer |
write_time | 等待写入的时间(毫秒) | integer |
io_time | I/O请求排队时间(毫秒) | integer |
weighted_io_time | I/O请求等待的时间(毫秒) | integer |
iops_in_progress | 已发出但尚未完成的I/O请求数量 | integer |
merged_reads | 合并的读取次数 | integer |
merged_writes | 合并的写入次数 | integer |
tags:
名称 | 描述 |
---|---|
name | 设备名称 |
serial | 设备序列号 |