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

feat(KFLUXVNGD-197): Add HypershiftAWSQuotaAlmostFull alerting rule #469

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions rhobs/alerting/data_plane/prometheus.eaas_alerts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: rhtap-eaas-alerting-rules
labels:
tenant: rhtap
spec:
groups:
- name: quota-alerts
interval: 1m
rules:
- alert: HypershiftAWSQuotaAlmostFull
annotations:
summary: Environment as a Service is approaching the quota for concurrent HyperShift AWS clusters
description: >-
Environment as a Service has {{ $value | humanize }} concurrent HyperShift AWS clusters
on cluster {{ $labels.source_cluster }}. The maximum allowed is 100.
alert_team_handle: <!subteam^S07NDQV6A4D> # @konflux-vanguard
runbook_url: https://gitlab.cee.redhat.com/konflux/docs/sop/-/blob/main/eaas/hypershift-aws-quota-almost-full.md
expr: platform:hypershift_hostedclusters:max{platform="AWS"} >= 80
for: 15m
labels:
severity: warning
32 changes: 32 additions & 0 deletions test/promql/tests/data_plane/eaas_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
evaluation_interval: 1m

rule_files:
- prometheus.eaas_alerts.yaml

tests:
- interval: 1m
input_series:
- series: platform:hypershift_hostedclusters:max{platform="AWS", source_cluster="cluster01"}
values: '80x15 0'
- series: platform:hypershift_hostedclusters:max{platform="AWS", source_cluster="cluster02"}
values: '79x15 0'

alert_rule_test:
- eval_time: 15m
alertname: HypershiftAWSQuotaAlmostFull
exp_alerts:
- exp_labels:
severity: warning
source_cluster: cluster01
platform: AWS
exp_annotations:
summary: Environment as a Service is approaching the quota for concurrent HyperShift AWS clusters
description: >-
Environment as a Service has 80 concurrent HyperShift AWS clusters on cluster cluster01.
The maximum allowed is 100.
alert_team_handle: <!subteam^S07NDQV6A4D>
runbook_url: https://gitlab.cee.redhat.com/konflux/docs/sop/-/blob/main/eaas/hypershift-aws-quota-almost-full.md

- eval_time: 16m
alertname: HypershiftAWSQuotaAlmostFull
exp_alerts: []