Display name only: UI, docs, API title, dashboards, hashtag and User-Agent. Identifiers (package, metrics, env vars, SCROBBLER_CONFIG) are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
153 lines
6.4 KiB
YAML
153 lines
6.4 KiB
YAML
groups:
|
|
- name: scrobbler
|
|
rules:
|
|
- alert: ScrobblerDown
|
|
expr: up{job="scrobbler-api"} == 0
|
|
for: 2m
|
|
labels: {severity: critical}
|
|
annotations:
|
|
summary: Scrobbled 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: FederationWeeklySummariesMissing
|
|
expr: sum(increase(scrobbler_worker_tasks_total{task="federation.weekly"}[30m])) == 0
|
|
for: 5m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: The weekly summary check hasn't run in 30 minutes
|
|
description: federation.weekly runs every 15 minutes regardless of whether anyone is due a post; the worker is probably stopped or stuck.
|
|
|
|
- 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: AlbumArtBacklog
|
|
expr: max(scrobbler_art_oldest_pending_seconds) > 900
|
|
for: 10m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: Album art requests have been waiting over 15 minutes
|
|
description: The worker is probably stopped, or MusicBrainz / Cover Art Archive is failing.
|
|
|
|
- alert: AlbumArtUpstreamErrors
|
|
expr: |
|
|
sum by (service) (rate(scrobbler_art_upstream_errors_total[15m]))
|
|
/ sum by (service) (rate(scrobbler_art_upstream_seconds_count[15m])) > 0.5
|
|
for: 15m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: Over half of {{ $labels.service }} album art calls are failing
|
|
description: Failed lookups are cached as errors and retried later; check the upstream's status.
|
|
|
|
- alert: AlbumArtCorrectionBacklog
|
|
expr: max(scrobbler_art_override_oldest_pending_seconds) > 900
|
|
for: 10m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: A manual album art correction has been waiting over 15 minutes
|
|
description: The worker is probably stopped, or MusicBrainz / Cover Art Archive is failing.
|
|
|
|
- alert: AlbumArtUploadRejections
|
|
expr: |
|
|
sum(rate(scrobbler_art_uploads_total{result!="ok"}[30m]))
|
|
/ sum(rate(scrobbler_art_uploads_total[30m])) > 0.5
|
|
and sum(rate(scrobbler_art_uploads_total[30m])) > 0.002
|
|
for: 30m
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: Most album art uploads are being rejected
|
|
description: Check the Album Art dashboard for the reason (too_large suggests ART_UPLOAD_MAX_BYTES or a proxy limit; bad_type a client sending the wrong format).
|
|
|
|
- alert: PostgresDown
|
|
expr: pg_up == 0
|
|
for: 2m
|
|
labels: {severity: critical}
|
|
annotations:
|
|
summary: Postgres is unreachable from postgres-exporter
|