Skip to main content
APA
Sponsored byCAST AI — Kubernetes cost optimizationBetter Stack — Uptime monitoring and log managementVictoriaMetrics — Fast, open-source time series database and drop-in Prometheus replacement.

KEDA logoKEDA Prometheus Alert Rules

6 Prometheus alerting rules for KEDA.Exported via Embedded exporter.These rules cover critical and warning conditions — copy and paste the YAML into your Prometheus configuration.

⚠️

Alert thresholds depend on the nature of your applications. Some queries may have arbitrary tolerance thresholds. Building an efficient monitoring platform takes time. 😉

7.6.KEDA logoEmbedded exporter(6 rules)

Scrape the KEDA operator metrics endpoint (port 8080 by default).
KEDA sets its own namespace label. Without honor_labels, Prometheus renames it to exported_namespace.
wget https://raw.githubusercontent.com/samber/awesome-prometheus-alerts/refs/heads/master/dist/rules/keda/embedded-exporter.yml
warning

7.6.1.KEDA ScaledObject errors

ScaledObject {{ $labels.namespace }}/{{ $labels.scaledObject }} keeps failing to read its scalers ({{ $value | printf "%.0f" }} errors in 5m). The workload is not scaled on fresh data; check the KEDA operator logs and the scaler source (auth, address, query).

- alert: KedaScaledobjectErrors
  expr: 'increase(keda_scaled_object_errors_total[5m]) > 0'
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: KEDA ScaledObject errors (instance {{ $labels.instance }})
    description: "ScaledObject {{ $labels.namespace }}/{{ $labels.scaledObject }} keeps failing to read its scalers ({{ $value | printf \"%.0f\" }} errors in 5m). The workload is not scaled on fresh data; check the KEDA operator logs and the scaler source (auth, address, query).\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

7.6.2.KEDA ScaledJob errors

ScaledJob {{ $labels.namespace }}/{{ $labels.scaledJob }} keeps failing to read its scalers ({{ $value | printf "%.0f" }} errors in 5m). No new Jobs are created on fresh data; check the KEDA operator logs and the scaler source.

- alert: KedaScaledjobErrors
  expr: 'increase(keda_scaled_job_errors_total[5m]) > 0'
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: KEDA ScaledJob errors (instance {{ $labels.instance }})
    description: "ScaledJob {{ $labels.namespace }}/{{ $labels.scaledJob }} keeps failing to read its scalers ({{ $value | printf \"%.0f\" }} errors in 5m). No new Jobs are created on fresh data; check the KEDA operator logs and the scaler source.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

7.6.3.KEDA scaler metrics latency high

Scaler {{ $labels.scaler }} of {{ $labels.namespace }}/{{ $labels.scaledObject }} takes {{ $value | humanizeDuration }} to return its metric. Slow scaler sources delay scaling decisions.

  # Threshold of 5s is arbitrary. Adjust it to the polling interval of your ScaledObjects and to how slow the scaler source (Prometheus query, cloud API) normally is.
- alert: KedaScalerMetricsLatencyHigh
  expr: 'keda_scaler_metrics_latency_seconds > 5'
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: KEDA scaler metrics latency high (instance {{ $labels.instance }})
    description: "Scaler {{ $labels.scaler }} of {{ $labels.namespace }}/{{ $labels.scaledObject }} takes {{ $value | humanizeDuration }} to return its metric. Slow scaler sources delay scaling decisions.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

7.6.4.KEDA scaling loop delayed

KEDA scaling loop for {{ $labels.type }} {{ $labels.namespace }}/{{ $labels.resource }} runs {{ $value | humanizeDuration }} later than scheduled. The operator is overloaded or blocked on slow scalers.

  # Threshold of 30s is arbitrary. Keep it above the polling interval of your ScaledObjects.
- alert: KedaScalingLoopDelayed
  expr: 'keda_internal_scale_loop_latency_seconds > 30'
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: KEDA scaling loop delayed (instance {{ $labels.instance }})
    description: "KEDA scaling loop for {{ $labels.type }} {{ $labels.namespace }}/{{ $labels.resource }} runs {{ $value | humanizeDuration }} later than scheduled. The operator is overloaded or blocked on slow scalers.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

7.6.5.KEDA CloudEvents emission failing

KEDA cannot deliver CloudEvents from {{ $labels.namespace }}/{{ $labels.cloudeventsource }} to sink {{ $labels.eventsink }}.

- alert: KedaCloudeventsEmissionFailing
  expr: 'increase(keda_cloudeventsource_events_emitted_total{state="failed"}[5m]) > 0'
  for: 0m
  labels:
    severity: warning
  annotations:
    summary: KEDA CloudEvents emission failing (instance {{ $labels.instance }})
    description: "KEDA cannot deliver CloudEvents from {{ $labels.namespace }}/{{ $labels.cloudeventsource }} to sink {{ $labels.eventsink }}.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
info

7.6.6.KEDA ScaledObject paused

ScaledObject {{ $labels.namespace }}/{{ $labels.scaledObject }} has been paused for more than 24h, so its workload is not autoscaled.

- alert: KedaScaledobjectPaused
  expr: 'keda_scaled_object_paused > 0'
  for: 24h
  labels:
    severity: info
  annotations:
    summary: KEDA ScaledObject paused (instance {{ $labels.instance }})
    description: "ScaledObject {{ $labels.namespace }}/{{ $labels.scaledObject }} has been paused for more than 24h, so its workload is not autoscaled.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"