Skip to content

Conversation

faec
Copy link
Contributor

@faec faec commented Sep 12, 2025

Add a monitoring component to ingest telemetry values from the collector's prometheus endpoint into the elastic_agent.collector dataset.

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 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

Enable agent monitoring while at least one component (including monitoring itself) uses the otel runtime. Prometheus metrics from the collector should be ingested to the elastic_agent.collector dataset.

Related issues

@faec faec self-assigned this Sep 12, 2025
@faec faec requested a review from a team as a code owner September 12, 2025 20:37
@faec faec added the enhancement New feature or request label Sep 12, 2025
Copy link
Contributor

mergify bot commented Sep 12, 2025

This pull request does not have a backport label. Could you fix it @faec? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@@ -486,6 +512,47 @@ func (b *BeatsMonitor) monitoringNamespace() string {
return defaultMonitoringNamespace
}

func (b *BeatsMonitor) getCollectorTelemetryEndpoint() string {
type metricsReaderConfig struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the least verbose way I could find to extract the prometheus endpoint configuration (the mapstructure annotations don't seem to accept dotted field names), but I'd be happy to learn if there's a better one.

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Sep 12, 2025
@elasticmachine
Copy link
Collaborator

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

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
2.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 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.

[beats receivers] OTel based pipeline must continue to report queue metrics for the elastic_agent integration
3 participants