-
Notifications
You must be signed in to change notification settings - Fork 193
[beatreceivers] Integrate beatsauthextension #9257
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
Conversation
This pull request does not have a backport label. Could you fix it @khushijain21? 🙏
|
A couple of observations testing this manually:
outputs:
default:
type: elasticsearch
hosts: [127.0.0.1:9200]
api_key: "example-key"
preset: balanced
ssl.key: /tmp/key.pem
ssl.certificate: /tmp/cert.pem
inputs:
- type: system/metrics
id: unique-system-metrics-input
data_stream.namespace: default
use_output: default
streams:
- metricsets:
- cpu
data_stream.dataset: system.cpu
agent.monitoring:
enabled: true
logs: true
metrics: true
_runtime_experimental: otel In otel-merged.yml from generated from that configuration I see the following with the ssl parameters missing: exporters:
elasticsearch/_agent-component/monitoring:
api_key: <REDACTED>
auth:
authenticator: <REDACTED>
batcher:
enabled: true
max_size: 1600
min_size: 0
compression: gzip
compression_params:
level: 1
endpoints:
- http://127.0.0.1:9200
idle_conn_timeout: 3s
logs_dynamic_id:
enabled: true
mapping:
mode: bodymap
retry:
enabled: true
initial_interval: 1s
max_interval: 1m0s
max_retries: 3
timeout: 1m30s
extensions:
beatsauth/_agent-component/monitoring:
idle_connection_timeout: 3s
proxy_disable: false
timeout: 1m30s The full agent status from this config shows that the ssl parameters are respected by the standard beat system/metrics input but appear to be ignored by the monitoring exporter since it's trying to connect to ES instead of failing to read the non-existent .pem files I told it to look for:
This one needs to be investigated and fixed before we can merge this.
|
For testing we already have elastic/beats#45491 for tracking that separately beyond what is already done in here. |
This pull request is now in conflicts. Could you fix it? 🙏
|
For your second point above.
I believe you started
so what happens is elastic-agent tries to create a new otel config from this, fails because it cannot read the non-existentent pem file and otel-manager continues with the previous Although, it does report the error here. "Failed to translate the config"
This is also why the diagnostics have missing ssl config. It never built the new config with incorrect ssl file path in the first place The standard beat system/metrics throws an explicit error that it failed to read the pem file because we haven't set the |
Thanks I totally missed agent was reporting the failure at the top level, we can iterate on this separately as part of #9771. Your explanation for why the ssl blocks are missing from the otel-merged.yml make sense, I would prefer we show what we are trying and failing to run there but I don't think it needs to block this PR. |
This pull request is now in conflicts. Could you fix it? 🙏
|
@cmacknz can you approve this PR? so we can merge this |
|
💚 Build Succeeded
History
|
* [beatreceivers] Integrate beatsauthextension * add test cases * final tests and this works * update * remove agent.port * mage otel:readme * address review comments * check is ssl.TLS is non-nil * address review comments * remove port * make notice for beatsauth * update beatsauthextension * beatsauth final test * final fix * add beatsauthextension test * Address comments * fix test * fix test * change comment * update beatsauthextension * Update internal/pkg/otel/translate/otelconfig.go Co-authored-by: Craig MacKenzie <[email protected]> * fix ci * add a test that a unique extension is created per output * fix ci * add comment * add better test * fix test --------- Co-authored-by: Craig MacKenzie <[email protected]> (cherry picked from commit 779fafd) # Conflicts: # internal/pkg/otel/manager/manager_test.go # internal/pkg/otel/translate/otelconfig.go # internal/pkg/otel/translate/otelconfig_test.go
* [beatreceivers] Integrate beatsauthextension * add test cases * final tests and this works * update * remove agent.port * mage otel:readme * address review comments * check is ssl.TLS is non-nil * address review comments * remove port * make notice for beatsauth * update beatsauthextension * beatsauth final test * final fix * add beatsauthextension test * Address comments * fix test * fix test * change comment * update beatsauthextension * Update internal/pkg/otel/translate/otelconfig.go Co-authored-by: Craig MacKenzie <[email protected]> * fix ci * add a test that a unique extension is created per output * fix ci * add comment * add better test * fix test --------- Co-authored-by: Craig MacKenzie <[email protected]> (cherry picked from commit 779fafd) # Conflicts: # internal/pkg/otel/README.md # internal/pkg/otel/manager/manager.go # internal/pkg/otel/manager/manager_test.go # internal/pkg/otel/translate/otelconfig.go # internal/pkg/otel/translate/otelconfig_test.go
* upstream: (26 commits) fix: ensure EDOT subprocess shuts down gracefully on agent termination (#9886) [main][Automation] Update versions (#9976) Add Collector reference docs and automation (#9953) [beatreceivers] Integrate beatsauthextension (#9257) [main][Automation] Update versions (#9941) Update OTel components to v0.132.0/v1.38.0 (#9954) Enhancement/5235 wrap errors when marking upgrade (#9366) Mount Go build cache into crossbuild container (#9094) Liveness agent state (#9673) [main][Automation] Bump VM Image version to 1757725254 (#9942) Enhancement/5235 correctly wrap errors from copyActionDir and copyRunDirectory (#9349) [main][Automation] Update elastic/beats to afc53c0479ac (#9874) Add -coverpkg option when running unit test to calculate coverage across packages (#9913) Cache binaries downloaded for packaging locally (#9133) [main][Automation] Update versions (#9897) Disable flaky test TestBeatsReceiverLogs (#9891) Allow overriding AGENT_PACKAGE_VERSION and MANIFEST_URL when USE_PACKAGE_VERSION=true (#9864) add ingest-docs team as CODEOWNERS for release notes and docset.yml (#9865) fix: correct spelling of 'output' in various templates and monitoring code (#9827) k8s: Add comment around hostUsers for Universal Profiling deployments (#9847) ...
* [beatreceivers] Integrate beatsauthextension * add test cases * final tests and this works * update * remove agent.port * mage otel:readme * address review comments * check is ssl.TLS is non-nil * address review comments * remove port * make notice for beatsauth * update beatsauthextension * beatsauth final test * final fix * add beatsauthextension test * Address comments * fix test * fix test * change comment * update beatsauthextension * Update internal/pkg/otel/translate/otelconfig.go Co-authored-by: Craig MacKenzie <[email protected]> * fix ci * add a test that a unique extension is created per output * fix ci * add comment * add better test * fix test --------- Co-authored-by: Craig MacKenzie <[email protected]>
What does this PR do?
This PR adds
beatsauthextension
to elasticsearch config translation layer and also propagates local logger to the translation logicWhy is it important?
It replaces es-exporter's
Rountripper
with beat's implementation of it. This is important for 1:1 behavioral compatibility between beats and beatreceiversChecklist
./changelog/fragments
using the changelog toolDisruptive User Impact
None
How to test this PR locally
Check E2E test
Related issues