elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
12.05k stars 4.89k forks source link

Fix pagetypeinfo behavior #39985

Closed fearful-symmetry closed 4 days ago

fearful-symmetry commented 1 week ago

Proposed commit message

closes https://github.com/elastic/beats/issues/32026

So, the linux kernel will truncate page counts over 100k: https://github.com/torvalds/linux/blob/e5b3efbe1ab1793bb49ae07d56d0973267e65112/mm/vmstat.c#L1521-L1528

We weren't handling this previously, so the metricset would just error out on the string >100000, as it didn't match the provided regex.

This fixes that, and also adds a log line and bit of documentation to clarify how it works.

As the attached issue notes, this is a bit of a hard problem to solve "properly" as attempting to get creative and supplement data from /proc/buddyinfo instead will almost certainly result in misaligned data.

Checklist

elasticmachine commented 1 week ago

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

mergify[bot] commented 1 week ago

This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @fearful-symmetry? 🙏. For such, you'll need to label your PR with:

To fixup this pull request, you need to add the backport labels for the needed branches, such as:

mergify[bot] commented 1 week ago

This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b pagetypeinfo-fixes upstream/pagetypeinfo-fixes
git merge upstream/main
git push upstream pagetypeinfo-fixes