Infra alerts

Scaleway Cockpit emails the alerts inbox (contact.alerts in config/app.toml) when a relay alert fires. Rules are Terraform: infra/scaleway/monitoring.tf and infra/scaleway/rules/*.yaml.

Alerts

AlertFires whenSeverity
RelayWalletCloseOnRefundFailedrefund kept the user's creditscritical
RelayDebitAfterInferenceFailedinference not chargedcritical
RelayWalletVanishedAfterDuplicatewallet row lost on retrycritical
RelayErrorLogsERROR lines > 10 / 5 minwarning
RelayHostileActivityDetectedverification failures > 20 / 10 minwarning
RelayContainerCpuHighCPU > 90% for 10 minwarning
RelayContainerMemoryHighmemory > 90% for 10 minwarning
RelayDbConnectionsHighDB connections > 50 for 10 minwarning
RelayRestartedcontainer cold start / deployinfo

Critical = money moved wrong; reconcile the wallet from the log line's wallet_id, don't restart. Warning = check Grafana. Info = the deploy canary; ignore unless you didn't deploy.

Deploy or change a rule

Edit the YAML, then:

just infra plan staging    # review the diff
just infra deploy staging  # then production

First time only, install the Loki/Mimir providers: just infra init staging.

Verify

  • RelayRestarted emails on the deploy itself — proves the pipeline.
  • Rules: Grafana → Alerting → Alert rules → namespace eigin-relay.
  • Test the email path directly: scw cockpit test-alert.
  • Logs: Grafana → Explore → Scaleway Logs → {resource_type="serverless_container"} (SSO login; API keys 401).

Tune

Too loud or too quiet? Change the threshold or for: in the YAML and redeploy. Keep rules aggregating over resource_type — the per-deploy resource_name hashes change. Email-only for now; Cockpit contact points don't support webhooks via Terraform yet.