Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup iostats field naming #4900

Merged
merged 2 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about read.bytes.per_sec to be as the previous one?

Copy link
Contributor Author

@ruflin ruflin Aug 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put bytes at the end as this is the unit.


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