Skip to content

Commit

Permalink
Add rate to throttled metric
Browse files Browse the repository at this point in the history
  • Loading branch information
kurlov committed Jul 19, 2024
1 parent c1a9b4b commit f64a66d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions resources/prometheus/prometheus-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ spec:
sop_url: "https://gitlab.cee.redhat.com/stackrox/acs-managed-service-runbooks/blob/master/sops/dp-047-emailsender-ses-send-error.md"
- alert: RHACSEmailsenderThrottledSend
expr: |
acs_emailsender_throttled_send_email_total > 0
for: 5m
rate(acs_emailsender_throttled_send_email_total[10m]) * 60 > 0
for: 10m
labels:
severity: warning
annotations:
summary: "Email Sender throttled sending for `{{ $labels.tenant_id }}` Central instance"
description: "Email Sender is throttled {{ $value }} times for `{{ $labels.tenant_id }}` Central"
description: "Email Sender throttled `{{ $labels.tenant_id }}` Central {{ $value | humanize }} time(s) per minute over the last 10 minutes."
sop_url: "https://gitlab.cee.redhat.com/stackrox/acs-managed-service-runbooks/blob/master/sops/dp-048-emailsender-ses-send-throttled.md"

- name: tenant-resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tests:
- interval: 1m
input_series:
- series: acs_emailsender_throttled_send_email_total{namespace="rhacs", pod="emailsender-123", container="emailsender", tenant_id="centralid"}
values: "0+0x10 2+0x50"
values: "0+0x10 2+1x60"
alert_rule_test:
- eval_time: 15m
alertname: RHACSEmailsenderThrottledSend
Expand All @@ -24,5 +24,5 @@ tests:
severity: warning
exp_annotations:
summary: "Email Sender throttled sending for `centralid` Central instance"
description: "Email Sender is throttled 2 times for `centralid` Central"
description: "Email Sender throttled `centralid` Central 1 time(s) per minute over the last 10 minutes."
sop_url: "https://gitlab.cee.redhat.com/stackrox/acs-managed-service-runbooks/blob/master/sops/dp-048-emailsender-ses-send-throttled.md"

0 comments on commit f64a66d

Please sign in to comment.