-
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 support for huge pages on Linux #6436
Conversation
s.UsedPercent = common.Round(perc, common.DefaultDecimalPlacesCount) | ||
} | ||
|
||
func GetHugeTLBPagesEvent(s *HugeTLBPagesStat) common.MapStr { |
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 function GetHugeTLBPagesEvent should have comment or be unexported
return nil, err | ||
} | ||
|
||
func AddHugeTLBPagesPercentage(s *HugeTLBPagesStat) { |
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 function AddHugeTLBPagesPercentage should have comment or be unexported
UsedPercent float64 `json:"used_p"` | ||
} | ||
|
||
func GetHugeTLBPages() (*HugeTLBPagesStat, error) { |
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 function GetHugeTLBPages should have comment or be unexported
e0d3c48
to
e917488
Compare
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.
This is looking good, you will need to update fields.yml to configure mapping for the new fields: https://www.elastic.co/guide/en/beats/devguide/current/metricset-details.html#_fields_yml
} | ||
|
||
// GetHugeTLBPagesEvent returns the event created from huge page usage metrics | ||
func GetHugeTLBPagesEvent(s *HugeTLBPagesStat) common.MapStr { |
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 think this function is not used?
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.
Umm, there are other similar GetFooEvent
functions here, and indeed they are not used in the beats repo, I though they were exported to be used somewhere else.
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.
@exekias WDYT? Should we keep these GetFooEvent
functions?
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.
Removed new unused function, old ones are left there by now.
Also have a look to system tests, you may want to check fields are in place in Linux: https://github.com/elastic/beats/blob/master/metricbeat/tests/system/test_system.py |
Failing tests should be fixed by |
426593a
to
f2472b7
Compare
I saw elastic/gosigar#97 was merged 🎉. Let's move this forward once we get a new tag version of it |
gosigar 0.9.0 released, I will go on with this PR using this version. |
c93f90f
to
4ca00ee
Compare
Can you add a changelog entry? |
Required for huge pages monitoring
4ca00ee
to
02fff19
Compare
Changelog entry added. |
We can continue merging this, it seems that the problem with gosigar was not introduced in 0.9.0, it was already reported before (#6271) |
Add support for huge pages on Linux, fixes #6351, requires elastic/gosigar#97