Add internal configuration to select runtime by output#12852
Open
khushijain21 wants to merge 14 commits intoelastic:mainfrom
Open
Add internal configuration to select runtime by output#12852khushijain21 wants to merge 14 commits intoelastic:mainfrom
khushijain21 wants to merge 14 commits intoelastic:mainfrom
Conversation
Contributor
|
This pull request is now in conflicts. Could you fix it? 🙏 |
Contributor
|
This pull request does not have a backport label. Could you fix it @khushijain21? 🙏
|
Contributor
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
Member
Contributor
🔍 Preview links for changed docs |
cmacknz
reviewed
Feb 20, 2026
Member
|
If I do the following, I get the agent.internal:
runtime:
filebeat:
filestream: otel
metricbeat:
system/metrics: process
output:
elasticsearch: otelDetails~/Downloads/builds/elastic-agent-9.4.0-SNAPSHOT-darwin-aarch64 ······································ 12:14:12 PM
❯ sudo elastic-development-agent version
Binary: 9.4.0-SNAPSHOT (build: 4bd82471639ef2238a1beaa37a32335b374a6686 at 2026-02-20 16:45:23 +0000 UTC)
Daemon: 9.4.0-SNAPSHOT (build: 4bd82471639ef2238a1beaa37a32335b374a6686 at 2026-02-20 16:45:23 +0000 UTC)
~/Downloads/builds/elastic-agent-9.4.0-SNAPSHOT-darwin-aarch64 ······································ 12:14:17 PM
❯ sudo elastic-development-agent inspect
agent:
internal:
runtime:
filebeat:
filestream: otel
metricbeat:
system/metrics: process
output:
elasticsearch: otel
logging:
to_stderr: true
inputs:
- data_stream:
namespace: default
id: unique-system-metrics-input
streams:
- data_stream:
dataset: system.cpu
type: system/metrics
use_output: default
- id: your-input-id
streams:
- data_stream:
dataset: generic
id: your-filestream-stream-id
paths:
- /var/log/*.log
type: filestream
outputs:
default:
api_key: <REDACTED>
hosts:
- 127.0.0.1:9200
preset: balanced
type: elasticsearch
~/Downloads/builds/elastic-agent-9.4.0-SNAPSHOT-darwin-aarch64 ······································ 12:14:21 PM
❯ sudo elastic-development-agent status --output=yaml
state: 3
message: 1 or more components/units in a degraded state
components:
- id: beat/metrics-monitoring
name: beat/metrics
state: 3
message: 'Recoverable: Elasticsearch request failed: dial tcp 127.0.0.1:9200: connect:
connection refused'
units:
- unit_id: beat/metrics-monitoring
unit_type: 1
state: 3
message: 'Recoverable: Elasticsearch request failed: dial tcp 127.0.0.1:9200:
connect: connection refused'
- unit_id: beat/metrics-monitoring-metrics-monitoring-beats
unit_type: 0
state: 2
message: ""
version_info:
name: beats-receiver
meta:
build_time: 2026-02-20 16:45:23 +0000 UTC
commit: 4bd82471639ef2238a1beaa37a32335b374a6686
- id: filestream-default
name: filestream
state: 3
message: 'Recoverable: Elasticsearch request failed: dial tcp 127.0.0.1:9200: connect:
connection refused'
units:
- unit_id: filestream-default
unit_type: 1
state: 3
message: 'Recoverable: Elasticsearch request failed: dial tcp 127.0.0.1:9200:
connect: connection refused'
- unit_id: filestream-default-your-input-id
unit_type: 0
state: 2
message: ""
version_info:
name: beats-receiver
meta:
build_time: 2026-02-20 16:45:23 +0000 UTC
commit: 4bd82471639ef2238a1beaa37a32335b374a6686
- id: filestream-monitoring
name: filestream
state: 3
message: 'Recoverable: Elasticsearch request failed: dial tcp 127.0.0.1:9200: connect:
connection refused'
units:
- unit_id: filestream-monitoring
unit_type: 1
state: 3
message: 'Recoverable: Elasticsearch request failed: dial tcp 127.0.0.1:9200:
connect: connection refused'
- unit_id: filestream-monitoring-filestream-monitoring-agent
unit_type: 0
state: 2
message: Healthy
version_info:
name: beats-receiver
meta:
build_time: 2026-02-20 16:45:23 +0000 UTC
commit: 4bd82471639ef2238a1beaa37a32335b374a6686
- id: http/metrics-monitoring
name: http/metrics
state: 3
message: 'Recoverable: Elasticsearch request failed: dial tcp 127.0.0.1:9200: connect:
connection refused'
units:
- unit_id: http/metrics-monitoring
unit_type: 1
state: 3
message: 'Recoverable: Elasticsearch request failed: dial tcp 127.0.0.1:9200:
connect: connection refused'
- unit_id: http/metrics-monitoring-metrics-monitoring-agent
unit_type: 0
state: 2
message: Healthy
version_info:
name: beats-receiver
meta:
build_time: 2026-02-20 16:45:23 +0000 UTC
commit: 4bd82471639ef2238a1beaa37a32335b374a6686
- id: system/metrics-default
name: system/metrics
state: 2
message: 'Healthy: communicating with pid ''32675'''
units:
- unit_id: system/metrics-default
unit_type: 1
state: 2
message: Healthy
- unit_id: system/metrics-default-unique-system-metrics-input
unit_type: 0
state: 2
message: Healthy
version_info:
name: beat-v2-client
meta:
build_time: 0001-01-01 00:00:00 +0000 UTC
commit: unknown
fleet_state: 6
fleet_message: Not enrolled into Fleet
collector:
status: 3
error: 'Elasticsearch request failed: dial tcp 127.0.0.1:9200: connect: connection
refused'
timestamp: 2026-02-20T12:10:30.780071-05:00
</details? |
Contributor
Author
|
@cmacknz can you take a look again. The above bug surprisingly didn't get caught in existing UT - fixed that too |
Contributor
💚 Build Succeeded
History
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds
agent.internal.runtime.outputsetting to allow selecting runtime based on output.Why is it important?
This is required to add support for logstash output in OTel mode and have the ability to switch runtimes.
Checklist
./changelog/fragmentsusing the changelog toolDisruptive User Impact
None
How to test this PR locally
Configure system/metrics input with logstash output. Instead of starting the Otel runtime,
system/metricswill now run using process runtimeRelated issues