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

Add IO operations in progress to be exported in diskio module #22066

Merged
merged 2 commits into from
Nov 23, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ same journal. {pull}18467[18467]
- Duplicate system.process.cmdline field with process.command_line ECS field name. {pull}22325[22325]
- Add connection and route metricsets for nats metricbeat module to collect metrics per connection/route. {pull}22445[22445]
- Add unit file states to system/service {pull}22557[22557]
- Add io.ops in fields exported by system.diskio. {pull}22066[22066]

*Packetbeat*

Expand Down
10 changes: 10 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40967,6 +40967,16 @@ type: long
The total number of of milliseconds spent doing I/Os.


type: long

--

*`system.diskio.io.ops`*::
+
--
The total number of I/Os in progress.


type: long

--
Expand Down
5 changes: 5 additions & 0 deletions metricbeat/module/system/diskio/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
type: long
description: >
The total number of of milliseconds spent doing I/Os.

- name: io.ops
type: long
description: >
The total number of I/Os in progress.

- name: iostat.read.request.merges_per_sec
type: float
Expand Down
5 changes: 5 additions & 0 deletions metricbeat/module/system/diskio/diskio.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error {
},
}

// Add linux-only ops in progress
if runtime.GOOS == "linux" {
event.Put("io.ops", counters.IopsInProgress)
}

// accumulate values from all interfaces
diskReadBytes += counters.ReadBytes
diskWriteBytes += counters.WriteBytes
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/system/fields.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion metricbeat/module/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"write.bytes", "read.time", "write.time"]

SYSTEM_DISKIO_FIELDS_LINUX = ["name", "read.count", "write.count", "read.bytes",
"write.bytes", "read.time", "write.time", "io.time",
"write.bytes", "read.time", "write.time", "io.time", "io.ops",
"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"]

Expand Down