beats
beats copied to clipboard
add label to force containter stats to stream - allowing podman containers to return precpu_stats
Proposed commit message
Checklist
- [X] My code follows the style guidelines of this project
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have made corresponding changes to the documentation
- [X] I have made corresponding change to the default configuration files
- [-] I have added tests that prove my fix is effective or that my feature works
- [X] I have added an entry in
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.
Author's Checklist
- [ ]
How to test this PR locally
Run any container with podman and use the docker plugin pointing to the podman socket like : hosts: ["unix:///run/user/1001/podman/podman.sock"]. There will be an error when using podman:
"log.origin":{"function":"github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).fetch","file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset docker.memory:>
Use a label on the container: co.elastic.metricbeat.docker.forceContainerStatsStream=true ... and the memory stats are read successfully.
Related issues
I did not see any issues but there are a few posts stackoverflow, etc. which do point out to this "issue"
Use cases
This allows the user to flag their podman container and see the memory usage.
Screenshots
Logs
"log.origin":{"function":"github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).fetch","file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset docker.memory:>
This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @ahbonsu? 🙏. For such, you'll need to label your PR with:
- The upcoming major version of the Elastic Stack
- The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
To fixup this pull request, you need to add the backport labels for the needed branches, such as:
-
backport-v8./d.0
is the label to automatically backport to the8./d
branch./d
is the digit
:grey_exclamation: Build Aborted
The PR is not allowed to run in the CI yet
the below badges are clickable and redirect to their specific view in the CI or DOCS
![]()
![]()
![]()
![]()
Expand to view the summary
Build stats
-
Start Time: 2024-01-29T10:07:01.340+0000
-
Duration: 5 min 51 sec
Steps errors 
Expand to view the steps failures
Load a resource file from a library
- Took 0 min 0 sec . View more details here
- Description:
approval-list/elastic/beats.yml
Error signal
- Took 0 min 0 sec . View more details here
- Description:
githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/ahbonsu return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/ahbonsu : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/ahbonsu : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}
:robot: GitHub comments
Expand to view the GitHub comments
To re-run your PR in the CI, just comment with:
-
/test
: Re-trigger the build. -
/package
: Generate the packages and run the E2E tests. -
/beats-tester
: Run the installation tests with beats-tester. -
run
elasticsearch-ci/docs
: Re-trigger the docs validation. (use unformatted text in the comment!)
:grey_exclamation: Build Aborted
Either there was a build timeout or someone aborted the build.
the below badges are clickable and redirect to their specific view in the CI or DOCS
![]()
![]()
![]()
![]()
Expand to view the summary
Build stats
- Duration: 5 min 37 sec
Steps errors 
Expand to view the steps failures
Load a resource file from a library
- Took 0 min 0 sec . View more details here
- Description:
approval-list/elastic/beats.yml
Error signal
- Took 0 min 0 sec . View more details here
- Description:
githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/ahbonsu return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/ahbonsu : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/ahbonsu : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}
:robot: GitHub comments
Expand to view the GitHub comments
To re-run your PR in the CI, just comment with:
-
/test
: Re-trigger the build. -
/package
: Generate the packages and run the E2E tests. -
/beats-tester
: Run the installation tests with beats-tester. -
run
elasticsearch-ci/docs
: Re-trigger the docs validation. (use unformatted text in the comment!)
This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @ahbonsu? 🙏. For such, you'll need to label your PR with:
- The upcoming major version of the Elastic Stack
- The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
To fixup this pull request, you need to add the backport labels for the needed branches, such as:
backport-v8./d.0
is the label to automatically backport to the8./d
branch./d
is the digit
Sorry, I cannot set them - permission denied :(
--> enhancement --> backport-v8.12.0
Pinging @elastic/elastic-agent (Team:Elastic-Agent)
This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @ahbonsu? 🙏. For such, you'll need to label your PR with:
- The upcoming major version of the Elastic Stack
- The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
To fixup this pull request, you need to add the backport labels for the needed branches, such as:
backport-v8./d.0
is the label to automatically backport to the8./d
branch./d
is the digitSorry, I cannot set them - permission denied :(
--> enhancement --> backport-v8.12.0
@ahbonsu , I set the enhancement for you For the backport because it is considered an enhancement usually we dont backport it. But in any case we will reconsider it internally.
Additionally while we are investigating the docker.memory: No memory stats data available", can you please also update the description of this PR with any screenshot or evidence for correct functionality of this PR?
This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @ahbonsu? 🙏. For such, you'll need to label your PR with:
- The upcoming major version of the Elastic Stack
- The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
To fixup this pull request, you need to add the backport labels for the needed branches, such as:
-
backport-v8./d.0
is the label to automatically backport to the8./d
branch./d
is the digit
@ahbonsu Did you have time to look at @gizas comment?
Setting back to draft for now.
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 main upstream/main
git merge upstream/main
git push upstream main