Skip to content

Conversation

@swiatekm
Copy link
Contributor

@swiatekm swiatekm commented Nov 27, 2025

What does this PR do?

Drops the policy parsing code from the monitoring manager. This configuration is reloaded via the Reload function and the manager has access to it in a structured format.

Why is it important?

The parsing code is ugly, difficult to understand, and unnecessary.

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

How to test this PR locally

Build agent locally, start it, and try changing the monitoring settings. In particular, this PR affects the failure_threshold and metrics_period settings.

# Conflicts:
#	internal/pkg/agent/application/monitoring/component/v1_monitor.go
#	internal/pkg/agent/application/monitoring/component/v1_monitor_test.go
@swiatekm swiatekm added Cleanup skip-changelog backport-active-all Automated backport with mergify to all the active branches labels Nov 27, 2025
@swiatekm swiatekm added backport-8.19 Automated backport to the 8.19 branch and removed backport-active-all Automated backport with mergify to all the active branches labels Dec 1, 2025
@swiatekm swiatekm marked this pull request as ready for review December 1, 2025 12:18
@swiatekm swiatekm requested a review from a team as a code owner December 1, 2025 12:19
@swiatekm swiatekm added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Dec 1, 2025
@elasticmachine
Copy link
Contributor

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

@swiatekm swiatekm requested a review from blakerouse December 1, 2025 12:19
@ycombinator
Copy link
Contributor

Did you mean to check in the testsignal binary? If not, perhaps we should add a .gitignore entry for it?

Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

Cleanup LGTM. Left a couple of nitpicks and a question about committing the testsignal binary.

@swiatekm
Copy link
Contributor Author

swiatekm commented Dec 1, 2025

Did you mean to check in the testsignal binary? If not, perhaps we should add a .gitignore entry for it?

It's already there. I think it got into this commit during a complicated rebase, I removed it.

@swiatekm swiatekm requested a review from ycombinator December 2, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch Cleanup 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.

4 participants