Get the FREE Ultimate OpenClaw Setup Guide →
d

Nomad

Scanned

@danfedick

npx machina-cli add skill @danfedick/nomad --openclaw
Files (1)
SKILL.md
3.1 KB

Nomad Skill

Query HashiCorp Nomad clusters using the nomad CLI. Read-only operations for monitoring and troubleshooting.

Requirements

  • nomad CLI installed
  • NOMAD_ADDR environment variable set (or defaults to http://127.0.0.1:4646)
  • NOMAD_TOKEN if ACLs are enabled

Commands

Jobs

List all jobs:

nomad job status

Get job details:

nomad job status <job-id>

Job history:

nomad job history <job-id>

Job deployments:

nomad job deployments <job-id>

Allocations

List allocations for a job:

nomad job allocs <job-id>

Allocation details:

nomad alloc status <alloc-id>

Allocation logs (stdout):

nomad alloc logs <alloc-id>

Allocation logs (stderr):

nomad alloc logs -stderr <alloc-id>

Follow logs:

nomad alloc logs -f <alloc-id>

Nodes

List all nodes:

nomad node status

Node details:

nomad node status <node-id>

Node allocations:

nomad node status -allocs <node-id>

Evaluations

List recent evaluations:

nomad eval list

Evaluation details:

nomad eval status <eval-id>

Services

List services (Nomad native service discovery):

nomad service list

Service info:

nomad service info <service-name>

Namespaces

List namespaces:

nomad namespace list

Variables

List variables:

nomad var list

Get variable:

nomad var get <path>

Cluster

Server members:

nomad server members

Agent info:

nomad agent-info

JSON Output

Add -json to most commands for JSON output:

nomad job status -json
nomad node status -json
nomad alloc status -json <alloc-id>

Filtering

Use -filter for expression-based filtering:

nomad job status -filter='Status == "running"'
nomad node status -filter='Status == "ready"'

Common Patterns

Find failed allocations

nomad job allocs <job-id> | grep -i failed

Get logs from latest allocation

nomad alloc logs $(nomad job allocs -json <job-id> | jq -r '.[0].ID')

Check cluster health

nomad server members
nomad node status

Environment Variables

  • NOMAD_ADDR — Nomad API address (default: http://127.0.0.1:4646)
  • NOMAD_TOKEN — ACL token for authentication
  • NOMAD_NAMESPACE — Default namespace
  • NOMAD_REGION — Default region
  • NOMAD_CACERT — Path to CA cert for TLS
  • NOMAD_CLIENT_CERT — Path to client cert for TLS
  • NOMAD_CLIENT_KEY — Path to client key for TLS

Notes

  • This skill is read-only. No job submissions, stops, or modifications.
  • Use nomad-tui for interactive cluster management.
  • For job deployment, use nomad job run <file.nomad.hcl> directly.

Source

git clone https://clawhub.ai/danfedick/nomadView on GitHub

Overview

Query HashiCorp Nomad clusters with the nomad CLI to list jobs, allocations, nodes, evaluations, and services. It provides read-only visibility ideal for monitoring and troubleshooting without risking changes.

How This Skill Works

Install the nomad CLI and set NOMAD_ADDR (and NOMAD_TOKEN if ACLs are enabled). Use commands such as nomad job status, nomad node status, nomad alloc status, and nomad eval list to fetch cluster state; append -json for machine-readable output suitable for automation.

When to Use It

  • During cluster health checks to verify running jobs and node readiness
  • When auditing allocations and job deployments
  • To inspect evaluations and service discovery state
  • For incident troubleshooting and status verification without making changes
  • When preparing automation or dashboards that consume JSON output

Quick Start

  1. Step 1: Install the nomad CLI and set NOMAD_ADDR (and NOMAD_TOKEN if needed).
  2. Step 2: Run a basic status check, e.g., nomad job status -json to fetch jobs.
  3. Step 3: Add -filter and -json to build automated monitoring queries (e.g., nomad node status -filter='Status == "ready"' -json).

Best Practices

  • Set NOMAD_ADDR to point at the correct cluster API
  • Prefer -json for automation and parsing
  • Use -filter to narrow results to running or ready items
  • Pipe output to jq or similar tooling for analysis
  • Remember this skill is read-only and avoid submissions

Example Use Cases

  • nomad job status -json
  • nomad node status -json
  • nomad job allocs <job-id> -json
  • nomad eval list -json
  • nomad service list -json

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers