Skip to content

Commit

Permalink
Cleanup iostats field naming (#4900)
Browse files Browse the repository at this point in the history
* Cleanup iostats field naming

Align naming with other metricsets.
  • Loading branch information
ruflin authored and tsg committed Aug 18, 2017
1 parent 654eafe commit cb5e05d
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 29 deletions.
20 changes: 12 additions & 8 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8773,63 +8773,67 @@ The total number of of milliseconds spent doing I/Os.
[float]
=== `system.diskio.iostat.read_request_merged_per_sec`
=== `system.diskio.iostat.read.request.merges_per_sec`
type: float
The number of read requests merged per second that were queued to the device.
[float]
=== `system.diskio.iostat.write_request_merged_per_sec`
=== `system.diskio.iostat.write.request.merges_per_sec`
type: float
The number of write requests merged per second that were queued to the device.
[float]
=== `system.diskio.iostat.read_request_per_sec`
=== `system.diskio.iostat.read.request.per_sec`
type: float
The number of read requests that were issued to the device per second
[float]
=== `system.diskio.iostat.write_request_per_sec`
=== `system.diskio.iostat.write.request.per_sec`
type: float
The number of write requests that were issued to the device per second
[float]
=== `system.diskio.iostat.read_byte_per_sec`
=== `system.diskio.iostat.read.per_sec.bytes`
type: float
format: bytes
The number of Bytes read from the device per second.
[float]
=== `system.diskio.iostat.write_byte_per_sec`
=== `system.diskio.iostat.write.per_sec.bytes`
type: float
format: bytes
The number of Bytes write from the device per second.
[float]
=== `system.diskio.iostat.avg_request_size`
=== `system.diskio.iostat.request.avg_size`
type: float
The average size (in sectors) of the requests that were issued to the device.
[float]
=== `system.diskio.iostat.avg_queue_size`
=== `system.diskio.iostat.queue.avg_size`
type: float
Expand Down
18 changes: 10 additions & 8 deletions metricbeat/module/system/diskio/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,42 +55,44 @@
description: >
The total number of of milliseconds spent doing I/Os.
- name: iostat.read_request_merged_per_sec
- name: iostat.read.request.merges_per_sec
type: float
description: >
The number of read requests merged per second that were queued to the device.
- name: iostat.write_request_merged_per_sec
- name: iostat.write.request.merges_per_sec
type: float
description: >
The number of write requests merged per second that were queued to the device.
- name: iostat.read_request_per_sec
- name: iostat.read.request.per_sec
type: float
description: >
The number of read requests that were issued to the device per second
- name: iostat.write_request_per_sec
- name: iostat.write.request.per_sec
type: float
description: >
The number of write requests that were issued to the device per second
- name: iostat.read_byte_per_sec
- name: iostat.read.per_sec.bytes
type: float
description: >
The number of Bytes read from the device per second.
format: bytes

- name: iostat.write_byte_per_sec
- name: iostat.write.per_sec.bytes
type: float
description: >
The number of Bytes write from the device per second.
format: bytes

- name: iostat.avg_request_size
- name: iostat.request.avg_size
type: float
description: >
The average size (in sectors) of the requests that were issued to the device.
- name: iostat.avg_queue_size
- name: iostat.queue.avg_size
type: float
description: >
The average queue length of the requests that were issued to the device.
Expand Down
38 changes: 27 additions & 11 deletions metricbeat/module/system/diskio/diskio.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,33 @@ func (m *MetricSet) Fetch() ([]common.MapStr, error) {
extraMetrics, err := m.statistics.CalIOStatistics(counters)
if err == nil {
event["iostat"] = common.MapStr{
"read_request_merged_per_sec": extraMetrics.ReadRequestMergeCountPerSec,
"write_request_merged_per_sec": extraMetrics.WriteRequestMergeCountPerSec,
"read_request_per_sec": extraMetrics.ReadRequestCountPerSec,
"write_request_per_sec": extraMetrics.WriteRequestCountPerSec,
"read_byte_per_sec": extraMetrics.ReadBytesPerSec,
"write_byte_per_sec": extraMetrics.WriteBytesPerSec,
"avg_request_size": extraMetrics.AvgRequestSize,
"avg_queue_size": extraMetrics.AvgQueueSize,
"await": extraMetrics.AvgAwaitTime,
"service_time": extraMetrics.AvgServiceTime,
"busy": extraMetrics.BusyPct,
"read": common.MapStr{
"request": common.MapStr{
"merges_per_sec": extraMetrics.ReadRequestMergeCountPerSec,
"per_sec": extraMetrics.ReadRequestCountPerSec,
},
"per_sec": common.MapStr{
"bytes": extraMetrics.ReadBytesPerSec,
},
},
"write": common.MapStr{
"request": common.MapStr{
"merges_per_sec": extraMetrics.WriteRequestMergeCountPerSec,
"per_sec": extraMetrics.WriteRequestCountPerSec,
},
"per_sec": common.MapStr{
"bytes": extraMetrics.WriteBytesPerSec,
},
},
"queue": common.MapStr{
"avg_size": extraMetrics.AvgQueueSize,
},
"request": common.MapStr{
"avg_size": extraMetrics.AvgRequestSize,
},
"await": extraMetrics.AvgAwaitTime,
"service_time": extraMetrics.AvgServiceTime,
"busy": extraMetrics.BusyPct,
}
}

Expand Down
4 changes: 2 additions & 2 deletions metricbeat/tests/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

SYSTEM_DISKIO_FIELDS_LINUX = ["name", "read.count", "write.count", "read.bytes",
"write.bytes", "read.time", "write.time", "io.time",
"iostat.read_request_merged_per_sec", "iostat.write_request_merged_per_sec", "iostat.read_request_per_sec", "iostat.write_request_per_sec", "iostat.read_byte_per_sec", "iostat.write_byte_per_sec"
"iostat.avg_request_size", "iostat.avg_queue_size", "iostat.await", "iostat.service_time", "iostat.busy"]
"iostat.read.request.merges_per_sec", "iostat.write.request.merges_per_sec", "iostat.read.request.per_sec", "iostat.write.request.per_sec", "iostat.read.per_sec.bytes", "iostat.write.per_sec.bytes"
"iostat.request.avg_size", "iostat.queue.avg_size", "iostat.await", "iostat.service_time", "iostat.busy"]

SYSTEM_FILESYSTEM_FIELDS = ["available", "device_name", "type", "files", "free",
"free_files", "mount_point", "total", "used.bytes",
Expand Down

0 comments on commit cb5e05d

Please sign in to comment.