-
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
[metricbeat] Add memory.stat data to the docker/memory metricset #12916
Merged
fearful-symmetry
merged 6 commits into
elastic:master
from
fearful-symmetry:docker-memory-stat
Jul 29, 2019
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
15f29a8
add memory.stat data to the docker/memory metricset
fearful-symmetry 88debdc
make object name stats, so it's more consistant
fearful-symmetry 5b0b030
fix tests
fearful-symmetry c73214b
fix mapping
fearful-symmetry 91f7e2d
update data.json
fearful-symmetry 7922e08
Add changelog entry
fearful-symmetry File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe, according to the naming conventions, this field should be called
rss.count
https://www.elastic.co/guide/en/beats/devguide/current/event-conventions.htmlThere 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.
How much do we want to fiddle with the stuff being scraped from the kernel interface? The full list of
total_*
events is generated programmatically by the kernel.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.
Like, this is what's happening in the kernel:
Seems like a potential lost cause to figure out what possible fields we would need to re-parse?
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.
having that Docker doesn't document these fields and is just passing them in raw I think that we could fail if we try to convert them. Could you update
data.json
? we should see how this looks by default there.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.
Just another opinion. I think that for this case it'd be fine to copy the stats map, as they are values taken directly from the OS, and I don't think they are going to change a lot. Also they seem to follow a good enough format (lowercase, snake case...).
But it is true that we risk to have fields explosion or other problems if some fancy feature is merged into the kernel.
Some things that we could do to improve this:
And +1 to have a
data.json
to have a better view of how it looks. It could be also nice to try it on Windows, to see if it has its own set of variables.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.
I initially thought of that, but schema.Apply seemed a bit like overkill considering everything is already a
uint64
. Should we just not use the type conversion part of it?How would that work? Is there some way to document this besides
fields.yml
?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.
passing this in raw sounds reasonable enough, worst case scenario at some point we discover this generates too much data, which seems unlikely anyway.
Updating
data.json
will help to give a good example of what to expect thereThere 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.
Yeah, I mean to add to
fields.yml
the fields we know, but as they look like quite low level metrics, I am ok too with documenting thedocker.memory.stats
group only.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.
Yah, the fact that they're so low level but also consistently typed makes me not too worried about them. I don't think there's any downside to the wildcard yml entry from the perspective of mapping, is there?