Kubernetes CronJob and Job workload visualization and Prometheus alerting

sk8l (skål) monitors Kubernetes CronJob, Job, and Pod activity in a namespace — inspect schedules, active and historical runs, unschedulable pods, and YAML manifests in the UI, and alert when scheduled jobs fail, run slow, or are suspended.

helm upgrade --install sk8l oci://ghcr.io/danroux/sk8l/sk8l --namespace sk8l --create-namespace
Overview

What sk8l includes

Web UI (GitHub Primer)

Built on GitHub's Primer design system. Inspect CronJob schedules, active and historical Job runs, container exit codes, unschedulable Pending pod reasons (such as Insufficient cpu or nodeSelector mismatches), and read-only YAML manifests.

Prometheus Metrics

Exports 6 OpenMetrics gauges for most recent finished run status, execution duration, active child Job count, and schedule state — without joining separate CronJob and Job series from kube-state-metrics or adding PushGateway wrappers to batch containers.

Grafana Dashboard Included

Ships dashboards/sk8l-overview.json with namespace and cronjob filters, status KPIs, state timelines, and duration panels — provisioned automatically via Helm ConfigMap for Grafana sidecars or imported as JSON.

No External Database or CRDs

Runs on linux/amd64 and linux/arm64 with read-only RBAC — no external database, persistent volumes, or custom resource definitions to manage.

Screenshots

Demos & Screenshots

Walk through the web UI, failure diagnostics, YAML manifest views, and Prometheus/Grafana integration. Click any screenshot to view full resolution.

UI Navigation Walkthrough

MP4 Demo
Navigating CronJob overviews, schedule frequency, failing jobs, and YAML specs.

Grafana Dashboard Integration

MP4 Demo
Importing the Grafana dashboard backed by sk8l's Prometheus metrics.
Quickstart

Install with Helm or try locally with kind

Requires Kubernetes 1.29+ and Helm 3.8+. See Artifact Hub or charts/sk8l/README.md for chart configuration and values.

bash — install into an existing cluster
helm upgrade --install sk8l oci://ghcr.io/danroux/sk8l/sk8l \
  --namespace sk8l \
  --create-namespace

kubectl -n sk8l port-forward svc/sk8l 8590:8590

Open http://localhost:8590 in your browser.

Metrics & Grafana

Prometheus & Grafana

sk8l exposes OpenMetrics gauges on /metrics (port 8590).

Metric Name Type Labels Description
sk8l_cronjobs_count Gauge namespace, status (registered, running, failing, completed) Current count of CronJobs by namespace and status.
sk8l_cronjob_last_run_status Gauge namespace, cronjob, status (succeeded, failed) Status of the most recent finished execution (1 if matching, 0 otherwise; 0 for both until first completion).
sk8l_cronjob_last_run_duration_seconds Gauge namespace, cronjob Duration in seconds of the most recent finished execution.
sk8l_cronjob_active_jobs Gauge namespace, cronjob Number of currently active child Jobs.
sk8l_cronjob_jobs_count Gauge namespace, cronjob, status (succeeded, failed) Retained child Jobs count by completion status.
sk8l_cronjob_info Gauge namespace, cronjob, schedule, suspend CronJob schedule and suspend state (1 constant value).

Example Alert & Dashboard Queries

promql
# Alert on a failing CronJob
sk8l_cronjob_last_run_status{status="failed"} == 1

# Count failing CronJobs
sum(sk8l_cronjobs_count{status="failing"})

# Top 5 slowest CronJobs
topk(5, sk8l_cronjob_last_run_duration_seconds)

# Suspended CronJobs
sk8l_cronjob_info{suspend="true"} == 1

Grafana Dashboard

Automatic Helm provisioning: Enabled by default (grafanaDashboard.enabled: true), creating a ConfigMap labeled grafana_dashboard: "1" for Grafana sidecar discovery (such as kube-prometheus-stack). For manual import, copy the JSON from dashboards/sk8l-overview.json or from the Dashboard modal in the sk8l web UI.

Prometheus Scrape Configuration

Point Prometheus to /metrics on svc/sk8l:8590, or use pod service discovery via the sk8l.io/api-scrape-port: "8590" pod annotation:

prometheus.yml
kubernetes_sd_configs:
  - role: pod
relabel_configs:
  - source_labels: [__meta_kubernetes_pod_annotation_sk8l_io_api_scrape_port]
    action: keep
    regex: (\d{4})
  - source_labels: [__address__, __meta_kubernetes_pod_annotation_sk8l_io_api_scrape_port]
    action: replace
    regex: ([^:]+)(?::\d+)?;(\d+)
    replacement: $1:$2
    target_label: __address__