User Tools

Site Tools


Hashicorp Nomad commands

Show stats about the server

Show consul agents (for dynamic clusters)

consul members
consul operator raft list-peers

Show servers

nomad server members

Show nodes

nomad node status
nomad node status -stats <node_id>

Show running jobs

nomad status
nomad status example

Show logs of an allocation

nomad logs -f -tail -n 10 <alloc_id>
nomad logs -f -tail -n 10 -stderr <alloc_id>

Show allocations

curl -XGET
curl -XGET "<prefix>"
curl -XGET<id>

Extract all current allocations in a file

curl -s -XGET | python -mjson.tool > extract.json
# inside vim, to know the nb of allocs in a state: :%s/ClientStatus": "running//gn
# or, if you want to list all current states : cat extract.json | grep '"State'

Trigger garbage collector

curl -XPUT
nomad.txt · Last modified: 2020/05/02 09:34 (external edit)