Skip to content

fix(observability): alert on old prod e2e clusters#6018

Open
mmazur wants to merge 1 commit into
Azure:mainfrom
mmazur:prod-e2e-old-cluster-alert
Open

fix(observability): alert on old prod e2e clusters#6018
mmazur wants to merge 1 commit into
Azure:mainfrom
mmazur:prod-e2e-old-cluster-alert

Conversation

@mmazur

@mmazur mmazur commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

https://redhat.atlassian.net/browse/AROSLSRE-1433

What

Adds ProdE2EHCPClusterOlderThan3Hours, a prod-only version of the existing int/stg stale HCP cluster alert. The new alert uses backend_cluster_created_time_seconds and filters by the prod e2e subscription IDs exposed in the metric subscription_id label.

Why

Prod e2e clusters can be left around and should page separately from the existing int/stg stale-cluster alert. Filtering by subscription keeps the alert scoped to prod e2e workloads instead of all prod customer clusters.

Testing

  • Ran go run ./... --config-file ../../observability/alerts-sl-services.yaml from tooling/prometheus-rules
  • Verified prod Grafana backend_cluster_created_time_seconds has subscription_id, environment, cluster, and resource_id labels in live services-* datasources

Special notes for your reviewer

The requested prod e2e subscriptions were checked against live prod Grafana. Current live series were present for 403d9de9-132b-4974-94a5-5b78bdfa191e; no current series were returned for the other two subscriptions, but the alert covers all three requested IDs.

PR Checklist

  • PR is scoped to a single task (no mixed concerns)
  • Title follows Conventional Commits format
  • Summary explains the "Why" behind the change
  • Linked to relevant ticket/issue
  • Screenshots included (if graph/UI/metrics changes)
  • Self-reviewed the diff
  • CI/CD checks are passing (ignore Tide)
  • Draft PR used for WIP (if applicable)
  • Commit history is clean (rebased/squashed)
  • Tricky code blocks are commented
  • Specific reviewers tagged
  • All comment threads resolved before merge

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: eb1f5796-2722-4381-9dd8-b54d49e72b4d
Copilot AI review requested due to automatic review settings July 10, 2026 15:32
@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mmazur

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a production-only Prometheus alert to page on stale prod E2E HCP clusters (older than 3 hours) by filtering backend_cluster_created_time_seconds on specific prod E2E subscription_id values, and wires it through the generated Azure Monitor Prometheus rule group output.

Changes:

  • Added ProdE2EHCPClusterOlderThan3Hours alert scoped to environment="prod" and a fixed allowlist of E2E subscription IDs.
  • Added promtool tests covering: fires for each allowed subscription, doesn’t fire for other prod subscriptions, and doesn’t fire before 3 hours.
  • Regenerated the corresponding Bicep rule in generatedPrometheusAlertingRules.bicep.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
observability/alerts/hcp-test-clusters-prometheusRule.yaml Adds the new prod E2E stale-cluster alert expression + annotations.
observability/alerts/hcp-test-clusters-prometheusRule_test.yaml Adds promtool coverage for the new prod E2E alert behavior.
dev-infrastructure/modules/metrics/rules/generatedPrometheusAlertingRules.bicep Includes the newly generated Azure Monitor Prometheus rule for the alert.

@mmazur

mmazur commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

1 similar comment
@mmazur

mmazur commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

@openshift-ci

openshift-ci Bot commented Jul 11, 2026

Copy link
Copy Markdown

@mmazur: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-parallel 3e8261e link true /test e2e-parallel

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants