Skip to content
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

[elastic-agent] fix: cpu cgroup values #23714

Merged
merged 4 commits into from
Feb 1, 2021
Merged

Conversation

simitt
Copy link
Contributor

@simitt simitt commented Jan 27, 2021

What does this PR do?

Minor fix for collecting cgroup based metrics.

follow up of #22793

Why is it important?

cgroups metrics are not reported due to a typo

How to test

  • create elastic agent docker image, e.g. DEV=true SNAPSHOT=true PLATFORMS=linux/amd64 TYPES=docker mage package
  • run image and pass some quota, e.g. --cpu-period=100000 --cpu-quota=50000
  • run load against APM Server, e.g. by using this testapp
  • check metrics indexed to ES and ensure cgroup values are set
GET *metric*/_search
{
  "_source": ["system.process.cgroup"],
  "query": {
    "exists": {
      "field": "system.process.cgroup"
    }
  }
}

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label Team:Ingest Management labels Jan 27, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 27, 2021
Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Did not test it locally but definitively looks like a typo.

# When running under Docker, we must ensure libbeat monitoring pulls cgroup
# metrics from /sys/fs/cgroup/<subsystem>/, ignoring any paths found in
# /proc/self/cgroup.
ENV LIBBEAT_MONITORING_CGROUPS_HIERARCHY_OVERRIDE=/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same fix as in #22879

@andresrc andresrc added the Team:Elastic-Agent Label for the Agent team label Jan 29, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #23714 updated

    • Start Time: 2021-02-01T10:23:34.091+0000
  • Duration: 90 min 32 sec

  • Commit: c779607

Test stats 🧪

Test Results
Failed 0
Passed 45151
Skipped 4737
Total 49888

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 45151
Skipped 4737
Total 49888

@simitt
Copy link
Contributor Author

simitt commented Feb 1, 2021

Failing E2E tests are unrelated.

@simitt simitt merged commit 6515ad5 into elastic:master Feb 1, 2021
simitt added a commit to simitt/beats that referenced this pull request Feb 1, 2021
* fix: cpu cgroup values
* fix:path for cgroup collection in docker
simitt added a commit that referenced this pull request Feb 4, 2021
* fix: cpu cgroup values
* fix:path for cgroup collection in docker
@simitt simitt deleted the agent-fix-cgroup branch July 16, 2021 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants