Skip to content
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

Metricbeat module with multiple metricsets overwrites the error status set by a previous metricset #41867

Open
mauri870 opened this issue Dec 3, 2024 · 1 comment
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@mauri870
Copy link
Member

mauri870 commented Dec 3, 2024

While investigating elastic/elastic-agent#6155, @VihasMakwana pointed out that if a Metricbeat module contains multiple metricsets, an error reported by one metricset is overwritten by another. This was tested with the latest DRA (8.17.0) of Elastic Agent.

The scenario goes like this:

  1. One metricset Fetch call reports a partial metrics error
  2. Almost immediately a new metricset from the same module reports a success
  3. The status of the previous metricset gets overwritten and it reports the status as success.
  4. Go to step 1, loop and repeat forever. Due to how fast this happens, the error is never shown to the user.

Here it says that PartialMetricsError is temporary and will be removed at some point, but we started using it in more than one place. I propose we remove this comment.

The likely cause of this issue appears to be in the following code that is called for the error result of a metricset Fetch op: metricbeat/mb/module/wrapper.go#L313-L336.

@mauri870 mauri870 added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Dec 3, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

2 participants