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

Add critical alert if cluster is throttling for two hours #523

Open
wants to merge 4 commits into
base: 2/edge
Choose a base branch
from
Open
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
12 changes: 11 additions & 1 deletion src/alert_rules/prometheus/prometheus_alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,20 @@

- "alert": "OpenSearchThrottling"
"annotations":
"message": "Cluster {{ $labels.cluster }} is throttling. Please optimize queries and indexing patterns or consider scale the application."
"message": "Cluster {{ $labels.cluster }} is throttling. Please review your indexing request rate, index lifecycle or consider scale the application."
"summary": "OpenSearch Indexing Throttle"
"expr": |
sum by (cluster) (opensearch_indices_indexing_is_throttled_bool) > 0
"for": "5m"
"labels":
"severity": "warning"

- "alert": "OpenSearchThrottlingTooLong"
"annotations":
"message": "Cluster {{ $labels.cluster }} is throttling for at least two hours. Please review your indexing request rate, index lifecycle or consider scale the application."
"summary": "OpenSearch Indexing Throttle too long"
"expr": |
sum by (cluster) (opensearch_indices_indexing_is_throttled_bool) > 0
"for": "2h"
"labels":
"severity": "critical"
17 changes: 16 additions & 1 deletion tests/unit/test_alert_rules/test_opensearch_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,20 @@ tests:
severity: warning
cluster: opensearch-x7zb
exp_annotations:
message: "Cluster opensearch-x7zb is throttling. Please optimize queries and indexing patterns or consider scale the application."
message: "Cluster opensearch-x7zb is throttling. Please review your indexing request rate, index lifecycle or consider scale the application."
summary: "OpenSearch Indexing Throttle"

- interval: 1m
input_series:
- series: 'opensearch_indices_indexing_is_throttled_bool{cluster="opensearch-x7zb"}'
values: '1x360'
alert_rule_test:
- eval_time: 2h
alertname: OpenSearchThrottlingTooLong
exp_alerts:
- exp_labels:
severity: critical
cluster: opensearch-x7zb
exp_annotations:
message: "Cluster opensearch-x7zb is throttling for at least two hours. Please review your indexing request rate, index lifecycle or consider scale the application."
summary: "OpenSearch Indexing Throttle too long"
Loading