lab6 done
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
groups:
|
||||
- name: messenger-slo
|
||||
rules:
|
||||
- alert: APIHighErrorRate
|
||||
expr: sum(rate(messenger_http_requests_total{status_class="5xx"}[1m])) / clamp_min(sum(rate(messenger_http_requests_total[1m])), 0.01) > 0.05
|
||||
for: 5s
|
||||
labels: {severity: warning}
|
||||
annotations:
|
||||
summary: More than 5 percent API server failures over 1 minute
|
||||
runbook_url: http://localhost:13000/d/messenger/messenger-observability
|
||||
description: Excludes health and client 4xx. Inspect PostgreSQL spans and pool; see RUNBOOK.md.
|
||||
- alert: QueueLagGrowing
|
||||
expr: max(messenger_queue_oldest_age_seconds) > 10 and max(messenger_queue_depth) > 0
|
||||
for: 5s
|
||||
labels: {severity: warning}
|
||||
annotations:
|
||||
summary: Oldest unfinished attachment exceeds 10 seconds
|
||||
runbook_url: http://localhost:13000/d/messenger/messenger-observability
|
||||
description: Inspect worker capacity, busy, outcomes and dependency spans; see RUNBOOK.md.
|
||||
@@ -0,0 +1,15 @@
|
||||
global:
|
||||
scrape_interval: 5s
|
||||
evaluation_interval: 5s
|
||||
rule_files: [/etc/prometheus/alerts.yaml]
|
||||
scrape_configs:
|
||||
- job_name: messenger
|
||||
static_configs: [{targets: ['collector:8889']}]
|
||||
- job_name: collector
|
||||
static_configs: [{targets: ['collector:8888']}]
|
||||
- job_name: tempo
|
||||
static_configs: [{targets: ['tempo:3200']}]
|
||||
- job_name: loki
|
||||
static_configs: [{targets: ['loki:3100']}]
|
||||
- job_name: prometheus
|
||||
static_configs: [{targets: ['localhost:9090']}]
|
||||
Reference in New Issue
Block a user