All work

Platform and reliability

The Spark job alert that paged nothing

A Spark job failed every run for a week and nobody was paged. Why, and how I rewrote the alerts to fire on real failures and clear on their own.

Ziax · CubeCraft and Rocket · 2026

The problem

CubeCraft’s analytics run as Spark jobs on Kubernetes. The alert for them keyed on failed driver pods. A failed driver pod sticks around until the operator reaps it, so one bad run kept the alert firing for hours. It got noisy enough that it was muted.

Meanwhile one Spark app failed every run for a week, and nobody got paged.

What I built

  1. Run failsdriver pod stays Failed
  2. Old rulecount of failed pods > 0
  3. Fires for hoursuntil the pod is reaped
  4. Mutedreal failures page nobody
Before: the alert keyed on something that latched.
  1. Each applast success time
  2. New ruleno success within its schedule
  3. Firesonly for an app that's actually down
  4. Clearson the next good run
After: the alert keys on liveness, so it fires and clears on its own.

The rule, in spirit

A sketch of the idea, not the production code.

# before: latches until cleanup
alert SparkJobFailed
  if count(driver_pods{phase="Failed"}) > 0

# after: per app, based on when it last worked
alert SparkAppNotSucceeding
  if time() - last_success_timestamp{app} > expected_interval{app} * 2
  for 15m
  labels: app, end_reason

What I took from it

A muted alert is worse than no alert, because everyone assumes it’s still watching. If an alert doesn’t clear on its own, people will mute it.

Stack