Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Read exclude_events_log value from policy when generating a diagnostic #4123

Open
jlind23 opened this issue Nov 18, 2024 · 2 comments
Open
Labels
Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@jlind23
Copy link
Contributor

jlind23 commented Nov 18, 2024

According to the tests @lucabelluccini performed in this pull request it seems that the exclude_events_log value sent down from the policy is not being looked at by the Elastic Agent internal.

@elasticmachine
Copy link
Contributor

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

@cmacknz
Copy link
Member

cmacknz commented Nov 18, 2024

I see it passed into ZipArchive

https://github.com/elastic/elastic-agent/blob/434986ed9fa6fbed6257557a4c6773d519742f66/internal/pkg/agent/application/actions/handlers/handler_action_diagnostics.go#L154
https://github.com/elastic/elastic-agent/blob/434986ed9fa6fbed6257557a4c6773d519742f66/internal/pkg/agent/application/actions/handlers/handler_action_diagnostics.go#L353

This is the exact same function call used by the elastic-agent diagnostics command: https://github.com/elastic/elastic-agent/blob/434986ed9fa6fbed6257557a4c6773d519742f66/internal/pkg/agent/cmd/diagnostics.go#L74

I think the actual problem is it isn't in the Fleet server OpenAPI spec and gets stripped when Fleet server serializes the action for agent.

actionRequestDiagnostics:
description: The REQUEST_DIAGNOSTICS action data.
properties:
additional_metrics:
description: list optional additional metrics.
type: array
items:
type: string
enum:
- CPU
- CONN

@cmacknz cmacknz transferred this issue from elastic/elastic-agent Nov 18, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

3 participants