Skip to content

Commit

Permalink
[Metricbeat] Remove io.time from windows (elastic#22237)
Browse files Browse the repository at this point in the history
* remove io.time from windows

* fix tests

* add changelog entry
  • Loading branch information
fearful-symmetry authored Oct 30, 2020
1 parent 985314a commit 77882fc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- [Kubernetes] Remove redundant dockersock volume mount {pull}22009[22009]
- Revert change to report `process.memory.rss` as `process.memory.wss` on Windows. {pull}22055[22055]
- Add a switch to the driver definition on SQL module to use pretty names {pull}17378[17378]
- Remove io.time from windows {pull}22237[22237]
- Add interval information to `monitor` metricset in azure. {pull}22152[22152]

*Packetbeat*
Expand Down
16 changes: 8 additions & 8 deletions metricbeat/module/system/diskio/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"system": {
"diskio": {
"io": {
"time": 601740
"time": 1296
},
"iostat": {
"await": 0,
Expand Down Expand Up @@ -48,16 +48,16 @@
}
}
},
"name": "sdb1",
"name": "sda6",
"read": {
"bytes": 25128030208,
"count": 3146154,
"time": 833872
"bytes": 335872,
"count": 82,
"time": 1296
},
"write": {
"bytes": 34401640448,
"count": 861040,
"time": 11224168
"bytes": 0,
"count": 0,
"time": 0
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/system/diskio/diskio.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error {
"time": counters.WriteTime,
"bytes": counters.WriteBytes,
},
"io": common.MapStr{
"time": counters.IoTime,
},
}

// accumulate values from all interfaces
Expand All @@ -123,6 +120,10 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error {
event["iostat"] = iostat.AddLinuxIOStat(result)
}

if runtime.GOOS != "windows" {
event.Put("io.time", counters.IoTime)
}

if counters.SerialNumber != "" {
event["serial_number"] = counters.SerialNumber
}
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"softirq.norm.pct", "steal.norm.pct", "system.norm.pct", "user.norm.pct"]

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

0 comments on commit 77882fc

Please sign in to comment.