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

[8.18](backport #6666) [k8s] Fix System Integration to utilise hostfs mounts #6810

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 11, 2025

What does this PR do?

This PR ensures that the Elastic Agent system integration correctly utilizes the /hostfs mount to collect host-level metrics. Previously, the system integration only monitored processes visible within the container due to missing configuration settings for the /hostfs path.

The changes include:

  • Adding system.hostfs: /hostfs to all relevant system metricsets in both the Helm Chart templates and rendered manifests.

Why is it important?

Without this fix, the Elastic Agent system integration collects only container-level metrics instead of full host-level metrics. This leads to incomplete observability of the Kubernetes nodes and limits visibility into host performance and resource utilization.

By explicitly setting system.hostfs: /hostfs, the agent can correctly access host-level /proc and /sys files, ensuring comprehensive monitoring.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • I have made corresponding changes to the default configuration files.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added an entry in ./changelog/fragments using the changelog tool.
  • I have added an integration test or an E2E test.

Disruptive User Impact

This change does not introduce breaking changes, as it only enhances system integration behavior without modifying existing user configurations. However, users who previously relied on container-only monitoring should be aware that host-level metrics will now be collected.

How to test this PR locally

  1. Deploy the Elastic Agent using the updated Helm Chart having system integration enabled.
  2. Verify that /proc and /sys are mounted under /hostfs inside the container.
  3. Validate that collected metrics reflect the host system rather than just the containerized environment.

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

This is an automatic backport of pull request #6666 done by [Mergify](https://mergify.com).

* [helm]: fix system integration to utilise hostfs mount

* [kustomize]: fix system integration to utilise hostfs mount

---------

Co-authored-by: Julien Lind <julien.lind@elastic.co>
(cherry picked from commit 45b0cf4)
@mergify mergify bot requested a review from a team as a code owner February 11, 2025 14:38
@mergify mergify bot added the backport label Feb 11, 2025
@mergify mergify bot requested review from swiatekm and pchila and removed request for a team February 11, 2025 14:38
@github-actions github-actions bot added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog labels Feb 11, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@pkoutsovasilis pkoutsovasilis enabled auto-merge (squash) February 11, 2025 18:24
@pkoutsovasilis pkoutsovasilis merged commit fd55c04 into 8.18 Feb 12, 2025
15 checks passed
@pkoutsovasilis pkoutsovasilis deleted the mergify/bp/8.18/pr-6666 branch February 12, 2025 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Something isn't working skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants