Skip to content

Conversation

@jharvey10
Copy link
Contributor

PR Description

Removes the misleading node_exporter_build_info metric from the prometheus.exporter.unix component.

Previously, this metric reported Alloy's build version (e.g., v1.10.2) instead of the underlying node_exporter's version, as it was generated using Alloy's build.NewCollector(). This fix ensures that the component does not expose incorrect build information.

Which issue(s) this PR fixes

Fixes #4330

Notes to the Reviewer

The upstream node_exporter library (v1.9.1, as used by Alloy) does not expose a node_exporter_build_info metric. Removing this incorrect metric aligns with upstream behavior and prevents confusion about the version reported.

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

Slack Thread

Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Dec 9, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

…rter version

The prometheus.exporter.unix component was registering a node_exporter_build_info
metric that incorrectly showed Alloy's version information instead of the actual
node_exporter version (v1.9.1).

This fix:
- Adds a custom buildInfoCollector that exposes the correct node_exporter version
- Uses the version from the github.com/prometheus/node_exporter dependency (v1.9.1)
- Includes the revision from the grafana/node_exporter fork being used
- Adds a test to verify the metric contains the correct version

Fixes #4330
@cursor cursor bot force-pushed the cursor/debug-grafana-alloy-issue-2bcb branch from 353cad1 to 473edfe Compare December 9, 2025 15:16
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jharvey10 jharvey10 changed the title Debug grafana alloy issue [wip] fix node_exporter version Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node_exporter_build_info contains version from alloy, not from node_exporter.

3 participants