GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(metrics): add SensorVersion and CollectorVersion labels to cluster info metric by redhat-chai-bot · Pull Request #24036 · stackrox/stackrox

Conversation

@redhat-chai-bot

@redhat-chai-bot redhat-chai-bot commented Nov 12, 2026

Copy link
Copy Markdown

Summary

Enrich the existing rox_central_health_cluster_info Prometheus metric with SensorVersion and CollectorVersion labels so that operators can monitor what versions their connected secured clusters are running.

Details

The rox_central_health_cluster_info gauge metric currently exposes Cluster (name), Type, and Status (health) labels. While sensor and collector version information is tracked internally in ClusterStatus, it is not surfaced in the metric.

This change adds two new label getters to central/metrics/custom/clusters/labels.go:

  • SensorVersion — reports the sensor version from ClusterStatus.SensorVersion
  • CollectorVersion — reports the collector version from CollectorHealthInfo.Version

This enables queries like:

rox_central_health_cluster_info{SensorVersion!="4.7.0"}

to quickly identify clusters running outdated versions.

Testing

  • go build ./central/metrics/custom/clusters/... passes
  • go test ./central/metrics/custom/... passes (all sibling packages including tracker)

Supersedes #24035 (reopened from upstream branch to fix fork-related CI failures).


AI-generated. Review for accuracy.

@johannes94 requested from Slack

Chai persona: ACS SIGs

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@redhat-chai-bot @claude
feat(metrics): add SensorVersion and CollectorVersion labels to clust…
0574e7e
…er info metric

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@github-actions github-actions Bot added the area/central label Nov 12, 2026
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Cluster metrics now include sensor and collector version labels.

LazyLabels adds SensorVersion and CollectorVersion labels. It reads their values from cluster status and collector health info.

Changes: Cluster version labels

Layer / File(s) Summary
Add version labels
central/metrics/custom/clusters/labels.go
LazyLabels adds getters for SensorVersion and CollectorVersion. The getters read from cluster status and collector health info.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Feature

Suggested reviewers: porridge

Merge Risk: Minimal · up to 0574e

The cluster info metric gains sensor and collector version labels. No concrete runtime risk was found. The PR title exceeds the 70-character limit and should be shortened for the title check to pass.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description covers the core content. It explains the motivation, names the two new label getters and their sources (ClusterStatus.SensorVersion and CollectorHealthInfo.Version), gives a query exam… Complete the template sections. Replace the 'change me!' placeholder in the Description section, or remove that section if the title is considered sufficient. State whether CHANGELOG.md is updated or not needed, and whether a documentation …
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the change accurately. The PR adds SensorVersion and CollectorVersion labels to the rox_central_health_cluster_info metric, and the raw summary confirms LazyLabels in labels.go adds th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change accurately. The PR adds SensorVersion and CollectorVersion labels to the rox_central_health_cluster_info metric, and the raw summary confirms LazyLabels in labels.go adds these two labels. The title is concise, follows a conventional commit style, and a teammate scanning history would understand the main change. It is 83 characters, which is acceptable.

Full details: Description check

Explanation

The description covers the core content. It explains the motivation, names the two new label getters and their sources (ClusterStatus.SensorVersion and CollectorHealthInfo.Version), gives a query example, and lists build and test results. It does not follow the repository template closely. The template's User-facing documentation checklist (CHANGELOG.md, documentation PR) and Testing and quality checklist (production readiness or feature flag, CI inspection) are missing. The Automated testing checklist is unchecked and the 'change me!' placeholder text remains in the template sections. The description also says the PR supersedes #24035 for fork-related CI failures, which is process detail rather than change detail. The 'How I validated' section lists commands but not a runtime check of the metric output.

Resolution

Complete the template sections. Replace the 'change me!' placeholder in the Description section, or remove that section if the title is considered sufficient. State whether CHANGELOG.md is updated or not needed, and whether a documentation PR is needed. Answer the production-readiness item: confirm the change is GA or gate it behind a feature flag. Check the CI results item. Mark which automated tests were added or modified, or explain why none were added. Replace the 'change me!' placeholder in the How I validated section with a short description of the manual or runtime validation, such as a curl or Prometheus query against the metric.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: e1e02a90-7aa0-4bae-9734-d1f2682a2332
Commits

Reviewing files that changed from the base of the PR and between 1f287d0 and 0574e7e.

Files selected for processing: 1

  • central/metrics/custom/clusters/labels.go

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

🚀 Build Images Ready

Images are ready for commit 0574e7e. To use with deploy scripts:

export MAIN_IMAGE_TAG=5.1.x-567-g0574e7eb60
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@github-actions

github-actions Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

🚀 Build Images Ready

Images are ready for commit 0574e7e. To use with deploy scripts:

export MAIN_IMAGE_TAG=5.1.x-567-g0574e7eb60
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

area/central

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@redhat-chai-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.