-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 docker diskio stats on Windows #8126
Conversation
9656e4d
to
e07941c
Compare
8b0773b
to
9f9dfed
Compare
9f9dfed
to
67fbc42
Compare
I'm thinking now that it'd be better if the module collected metrics from all OSs instead of having two different metrics, as one metricbeat can be collecting from a docker server in a different OS. |
type BlkioRaw struct { | ||
Time time.Time | ||
reads uint64 | ||
writes uint64 | ||
totals uint64 | ||
} | ||
|
||
func (s *BlkioRaw) Add(o *BlkioRaw) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method BlkioRaw.Add should have comment or be unexported
@@ -36,13 +36,28 @@ type BlkioStats struct { | |||
servicedBytes BlkioRaw | |||
} | |||
|
|||
func (s *BlkioStats) Add(o *BlkioStats) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method BlkioStats.Add should have comment or be unexported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you for taking this one!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like we should test docker also on Windows in the future ...
@jsoriano Does this need a backport label? |
Yes, I will backport it for 6.x |
Docker stats use a different data structure for blkio stats in Windows, the main difference is that in posix systems (Linux at least) stats are separated by device by Major/Minor (lists of BlkioStatsEntry), and in Windows they are directly summarized by reads and writes, by operations and volume (StorageStats). This change counts the metrics of both data structures and aggregates the result. Fixes elastic#6815 (cherry picked from commit 63f25a4)
Docker stats use a different data structure for blkio stats in Windows, the main difference is that in posix systems (Linux at least) stats are separated by device by Major/Minor (lists of BlkioStatsEntry), and in Windows they are directly summarized by reads and writes, by operations and volume (StorageStats). This change counts the metrics of both data structures and aggregates the result. Fixes #6815 (cherry picked from commit 63f25a4)
Docker stats use a different data structure for blkio stats in Windows, the main difference is that in posix systems (Linux at least) stats are separated by device by Major/Minor (lists of BlkioStatsEntry), and in Windows they are directly summarized by reads and writes, by operations and volume (StorageStats).
This change counts the metrics of both data structures and aggregates the result.
Fixes #6815