Skip to main content
APA
Sponsored by CAST AI — Kubernetes cost optimization Better Stack — Uptime monitoring and log management
⚠️

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

Nomad Prometheus Alert Rules

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

7.2. Embedded exporter (4 rules)

wget https://raw.githubusercontent.com/samber/awesome-prometheus-alerts/refs/heads/master/dist/rules/nomad/embedded-exporter.yml
warning

7.2.1. Nomad job failed

Nomad job {{ $labels.job }} has {{ $value }} failed allocations.

- alert: NomadJobFailed
  expr: nomad_nomad_job_summary_failed > 0
  for: 0m
  labels:
    severity: warning
  annotations:
    summary: Nomad job failed (instance {{ $labels.instance }})
    description: "Nomad job {{ $labels.job }} has {{ $value }} failed allocations.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

7.2.2. Nomad job lost

Nomad job {{ $labels.job }} has {{ $value }} lost allocations.

- alert: NomadJobLost
  expr: nomad_nomad_job_summary_lost > 0
  for: 0m
  labels:
    severity: warning
  annotations:
    summary: Nomad job lost (instance {{ $labels.instance }})
    description: "Nomad job {{ $labels.job }} has {{ $value }} lost allocations.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

7.2.3. Nomad job queued

Nomad job {{ $labels.job }} has {{ $value }} queued allocations.

- alert: NomadJobQueued
  expr: nomad_nomad_job_summary_queued > 0
  for: 2m
  labels:
    severity: warning
  annotations:
    summary: Nomad job queued (instance {{ $labels.instance }})
    description: "Nomad job {{ $labels.job }} has {{ $value }} queued allocations.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

7.2.4. Nomad blocked evaluation

Nomad has {{ $value }} blocked evaluations. The cluster may lack resources to place allocations.

- alert: NomadBlockedEvaluation
  expr: nomad_nomad_blocked_evals_total_blocked > 0
  for: 0m
  labels:
    severity: warning
  annotations:
    summary: Nomad blocked evaluation (instance {{ $labels.instance }})
    description: "Nomad has {{ $value }} blocked evaluations. The cluster may lack resources to place allocations.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"