Skip to content

Conversation

@leehinman
Copy link
Contributor

@leehinman leehinman commented Dec 4, 2025

What does this PR do?

Changes the default runtime for the "system/metrics" metricbeat input to be "otel"

Why is it important?

Part of conversion to beat receivers. "system/metrics" has been tested with otel runtime and has been deemed ready to be the default.

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 change 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

One less agentbeat process will be running with the system integration and elastic-agent otel will collect the data using a beat receiver.

Users should see no other change than the drop in processes.

How to test this PR locally

Integration test

cd pkg/component
go test .

Manual testing

Install agent with system integration in policy.

elastic-agent status --output full will be similar to:

ubuntu@test:~/elastic-agent-9.3.0-SNAPSHOT-linux-arm64$ sudo elastic-agent status --output full
┌─ fleet
│  └─ status: (HEALTHY) Connected
└─ elastic-agent
   ├─ status: (HEALTHY) Running
   ├─ info
   │  ├─ id: 2734d015-24ec-43a4-9017-12017fbbb3ce
   │  ├─ version: 9.3.0
   │  └─ commit: a85ca5c5752d8e0df404eb4e3b5fbda2649e5b7a
   ├─ beat/metrics-monitoring
   │  ├─ status: (HEALTHY) Healthy
   │  ├─ beat/metrics-monitoring
   │  │  ├─ status: (HEALTHY) Healthy
   │  │  └─ type: OUTPUT
   │  └─ beat/metrics-monitoring-metrics-monitoring-beats
   │     ├─ status: (HEALTHY) Healthy
   │     └─ type: INPUT
   ├─ filestream-monitoring
   │  ├─ status: (HEALTHY) Healthy
   │  ├─ filestream-monitoring
   │  │  ├─ status: (HEALTHY) Healthy
   │  │  └─ type: OUTPUT
   │  └─ filestream-monitoring-filestream-monitoring-agent
   │     ├─ status: (HEALTHY) Healthy
   │     └─ type: INPUT
   ├─ http/metrics-monitoring
   │  ├─ status: (HEALTHY) Healthy
   │  ├─ http/metrics-monitoring
   │  │  ├─ status: (HEALTHY) Healthy
   │  │  └─ type: OUTPUT
   │  └─ http/metrics-monitoring-metrics-monitoring-agent
   │     ├─ status: (HEALTHY) Healthy
   │     └─ type: INPUT
   ├─ log-default
   │  ├─ status: (HEALTHY) Healthy: communicating with pid '1752'
   │  ├─ log-default
   │  │  ├─ status: (HEALTHY) Healthy
   │  │  └─ type: OUTPUT
   │  └─ log-default-logfile-system-e3b5495e-768f-4798-ac7b-0384efb79ad2
   │     ├─ status: (HEALTHY) Healthy
   │     └─ type: INPUT
   ├─ prometheus/metrics-monitoring
   │  ├─ status: (HEALTHY) Healthy
   │  ├─ prometheus/metrics-monitoring
   │  │  ├─ status: (HEALTHY) Healthy
   │  │  └─ type: OUTPUT
   │  └─ prometheus/metrics-monitoring-metrics-monitoring-collector
   │     ├─ status: (HEALTHY) Healthy
   │     └─ type: INPUT
   └─ system/metrics-default
      ├─ status: (HEALTHY) Healthy
      ├─ system/metrics-default
      │  ├─ status: (HEALTHY) Healthy
      │  └─ type: OUTPUT
      └─ system/metrics-default-system/metrics-system-e3b5495e-768f-4798-ac7b-0384efb79ad2
         ├─ status: (HEALTHY) Healthy
         └─ type: INPUT

Can be overridden using #11186

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?
  • ...

@mergify
Copy link
Contributor

mergify bot commented Dec 4, 2025

This pull request does not have a backport label. Could you fix it @leehinman? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@leehinman leehinman force-pushed the system_metrics_otel_runtime branch from a85ca5c to 9bf6f18 Compare December 4, 2025 17:40
@leehinman leehinman force-pushed the system_metrics_otel_runtime branch from 0871d6c to 3795567 Compare December 4, 2025 22:54
@leehinman leehinman marked this pull request as ready for review December 5, 2025 00:59
@leehinman leehinman requested a review from a team as a code owner December 5, 2025 00:59
@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 5, 2025

💔 Build Failed

Failed CI Steps

History

cc @leehinman

}

require.Len(ct, status.Components, expectedComponentCount, "expected right number of components in agent status")

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not following why these lines were removed.

Copy link
Contributor

@swiatekm swiatekm Dec 5, 2025

Choose a reason for hiding this comment

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

@leehinman I think it'd be better if you explicitly set system/metrics to run in the process runtime in this test. We want to have a non-otel component in it to verify the env variable doesn't affect it, as far as I understand. @mauri870 is that correct?

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. The way I did it here is not the best, but the goal was to confirm the env changes the runtime of monitoring components but keeps non monitoring components unnafected.

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Dec 5, 2025
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

6 participants