Files
nomad/website/content/docs/commands/eval/status.mdx
Tim Gross aa3c08d069 eval status: enrich with related evals and placed allocs tables (#26156)
When debugging an evaluation, you almost always want to know about all the
related evaluations and what allocations were placed by that evaluation (and
where), not just failed placements. We can enrich the command by adding the
`related` query parameter to the API, and having the command query for the
evaluations allocations automatically. Emit this data as a pair of new tables
and expose fields like quota limits, and previous/next/blocked eval without the
`-verbose` flag.

Update the docs to include the full output and remove references to long-removed
behavior of the `-json` flag.

Ref: https://hashicorp.atlassian.net/browse/NMD-818
Ref: https://go.hashi.co/rfc/nmd-212
2025-06-30 09:23:36 -04:00

104 lines
3.6 KiB
Plaintext

---
layout: docs
page_title: 'nomad eval status command reference'
description: >
The `nomad eval status` command displays the status and potential failed
allocations of an evaluation. Use with the `monitor` flag to start an interactive monitoring session.
---
# `nomad eval status` command reference
The `eval status` command is used to display information about an existing
evaluation. In the case an evaluation could not place all the requested
allocations, this command can be used to determine the failure reasons.
Optionally, it can also be invoked in a monitor mode to track an outstanding
evaluation. In this mode, logs will be output describing state changes to the
evaluation or its associated allocations. The monitor will exit when the
evaluation reaches a terminal state.
## Usage
```plaintext
nomad eval status [options] <evaluation>
```
An evaluation ID or prefix must be provided. If there is an exact match, the
the status will be shown. Otherwise, a list of matching evaluations and
information will be displayed.
If the `-monitor` flag is passed, an interactive monitoring session will be
started in the terminal. It is safe to exit the monitor at any time using
ctrl+c. The command will exit when the given evaluation reaches a terminal
state (completed or failed). Exit code 0 is returned on successful
evaluation, and if there are no scheduling problems. If there are
job placement issues encountered (unsatisfiable constraints,
resource exhaustion, etc), then the exit code will be 2. Any other
errors, including client connection issues or internal errors, are
indicated by exit code 1.
## Options
- `-monitor`: Monitor an outstanding evaluation
- `-verbose`: Show full-length IDs and exact timestamps.
- `-json`: Output the evaluation in its JSON format. This format will not
include placed allocations.
- `-t` : Format and display evaluation using a Go template. This format will not
include placed allocations.
- `-ui`: Open the evaluation in the browser.
## Examples
Show the status of an evaluation with related evaluations, successful
placements, failed placements.
```shell-session
$ nomad eval status 8f6af533
ID = 8f6af533
Create Time = 11s ago
Modify Time = 10s ago
Status = complete
Status Description = complete
Type = service
TriggeredBy = job-register
Job ID = example
Namespace = default
Priority = 50
Placement Failures = true
Previous Eval = c324b46f
Next Eval = <none>
Blocked Eval = 2b83d3af
Related Evaluations
ID Priority Triggered By Node ID Status Description
fd6f3091 50 queued-allocs <none> pending <none>
Placed Allocations
ID Node ID Task Group Version Desired Status Created Modified
b7e298fa 24c15262 web 2 run running 10s ago 2s ago
108841a9 41f70903 web 2 run pending 3s ago 1s ago
4869a26d d372b337 web 2 run pending 4s ago 0s ago
Failed Placements
Task Group "web" (failed to place 1 allocation):
* Constraint "${attr.kernel.name} = linux": 2 nodes excluded by filter
* Resources exhausted on 2 nodes
* Dimension "memory" exhausted on 2 nodes
Evaluation "2b83d3af" waiting for additional capacity to place remainder
```
Monitor an existing evaluation
```shell-session
$ nomad eval status -monitor 8262bc83
==> Monitoring evaluation "8262bc83"
Allocation "bd6bd0de" created: node "6f299da5", group "group1"
Evaluation status changed: "pending" -> "complete"
==> Evaluation "8262bc83" finished with status "complete"
```
## General options
@include 'general_options.mdx'