CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 12s
CI / test (push) Successful in 2m2s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 5s
Federation dashboard gains follower and request counts, inbox and delivery queue depths, activities received by type and result, incoming signature results by scheme and reason, deliveries by result, delivery latency and outgoing signature schemes. Every query was run against a live Prometheus. Alerts: FederationDeliveryBacklog (>100 waiting for 30m), FederationInboxBacklog (unprocessed for 15m) and FederationSignatureFailures (>20% failing for 15m). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
108 lines
4.2 KiB
YAML
108 lines
4.2 KiB
YAML
groups:
|
|
- name: scrobbler
|
|
rules:
|
|
- alert: ScrobblerDown
|
|
expr: up{job="scrobbler-api"} == 0
|
|
for: 2m
|
|
labels: {severity: critical}
|
|
annotations:
|
|
summary: Scrobbler API metrics endpoint is down
|
|
description: Prometheus hasn't been able to scrape {{ $labels.instance }} for 2 minutes.
|
|
|
|
- alert: HighErrorRate
|
|
expr: |
|
|
sum(rate(scrobbler_http_requests_total{status=~"5.."}[5m]))
|
|
/ sum(rate(scrobbler_http_requests_total[5m])) > 0.05
|
|
for: 5m
|
|
labels: {severity: critical}
|
|
annotations:
|
|
summary: More than 5% of API requests are failing
|
|
description: 5xx ratio is {{ $value | humanizePercentage }}.
|
|
|
|
- alert: HighLatency
|
|
expr: |
|
|
histogram_quantile(0.95,
|
|
sum by (le) (rate(scrobbler_http_request_duration_seconds_bucket[5m]))) > 1
|
|
for: 10m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: API p95 latency is above 1s
|
|
description: p95 latency is {{ $value | humanizeDuration }}.
|
|
|
|
- alert: AuthFailureSpike
|
|
expr: sum(rate(scrobbler_auth_failures_total[5m])) > 10
|
|
for: 5m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: Unusually many authentication failures
|
|
description: "{{ $value | humanize }} failures/s: check for a misconfigured client or credential stuffing."
|
|
|
|
- alert: ScrobbleIgnoreRateHigh
|
|
expr: |
|
|
sum(rate(scrobbler_scrobbles_total{result="ignored"}[15m]))
|
|
/ sum(rate(scrobbler_scrobbles_total[15m])) > 0.2
|
|
for: 15m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: More than 20% of scrobbles are being ignored
|
|
description: A client may be sending bad timestamps or empty metadata.
|
|
|
|
- alert: DBPoolExhausted
|
|
expr: |
|
|
sum(scrobbler_db_pool_connections{state="checked_out"})
|
|
>= sum(scrobbler_db_pool_connections{state="size"})
|
|
for: 5m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: Every pooled database connection is in use
|
|
description: Workers are running on overflow connections; requests may queue.
|
|
|
|
- alert: ImportWorkerDown
|
|
expr: up{job="scrobbler-worker"} == 0
|
|
for: 5m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: The import worker isn't running
|
|
description: History imports will wait until it's back.
|
|
|
|
- alert: ImportJobsWaiting
|
|
expr: max(scrobbler_import_jobs{status="pending"}) > 0 and max(scrobbler_import_jobs{status="running"}) == 0
|
|
for: 15m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: Imports have been waiting for 15 minutes with nothing running
|
|
description: The import worker is probably stopped or stuck.
|
|
|
|
- alert: FederationDeliveryBacklog
|
|
expr: max(scrobbler_federation_queue{queue="deliveries",status="pending"}) > 100
|
|
for: 30m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: Over 100 fediverse deliveries have been waiting for 30 minutes
|
|
description: Check the worker is running and outbound HTTPS works; one slow server can back up retries.
|
|
|
|
- alert: FederationInboxBacklog
|
|
expr: max(scrobbler_federation_queue{queue="inbox",status="queued"}) > 0
|
|
for: 15m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: Received fediverse activities haven't been processed for 15 minutes
|
|
description: The worker is probably stopped, or stuck on something.
|
|
|
|
- alert: FederationSignatureFailures
|
|
expr: |
|
|
sum(rate(scrobbler_federation_signatures_total{direction="in",result!="ok"}[15m]))
|
|
/ sum(rate(scrobbler_federation_signatures_total{direction="in"}[15m])) > 0.2
|
|
for: 15m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: More than 20% of incoming fediverse signatures are failing
|
|
description: Check the Federation dashboard for the reason (e.g. a clock problem shows as 'expired').
|
|
|
|
- alert: PostgresDown
|
|
expr: pg_up == 0
|
|
for: 2m
|
|
labels: {severity: critical}
|
|
annotations:
|
|
summary: Postgres is unreachable from postgres-exporter
|