github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/deployment/status.mdx (about) 1 --- 2 layout: docs 3 page_title: 'Commands: deployment status' 4 description: | 5 The deployment status command is used to display the status of a deployment. 6 --- 7 8 # Command: deployment status 9 10 The `deployment status` command is used to display the status of a deployment. 11 The status will display the number of desired changes as well as the currently 12 applied changes. 13 14 ## Usage 15 16 ```plaintext 17 nomad deployment status [options] <deployment id> 18 ``` 19 20 The `deployment status` command requires a single argument, a deployment ID or 21 prefix. 22 23 A `-monitor` flag can be used to update the current deployment status until completion. 24 When combined with `-verbose`, it will also display the allocations for the given 25 deployment. If the deployment fails and [`auto_revert`] is set to `true`, it will monitor 26 the entire process, showing the failure and then monitoring the deployment of the rollback. 27 28 When ACLs are enabled, this command requires a token with the 'read-job' 29 capability for the deployment's namespace. 30 31 ## General Options 32 33 @include 'general_options.mdx' 34 35 ## Status Options 36 37 - `-json` : Output the deployment in its JSON format. 38 - `-t` : Format and display the deployment using a Go template. 39 - `-verbose`: Show full information. 40 - `-monitor`: Enter monitor mode to poll for updates to the deployment status. 41 - `-wait`: How long to wait before polling an update, used in conjunction with monitor 42 mode. Defaults to 2s. 43 44 ## Examples 45 46 Inspect the status of a complete deployment: 47 48 ```shell-session 49 $ nomad deployment status 06ca68a2 50 ID = 06ca68a2 51 Job ID = example 52 Job Version = 0 53 Status = successful 54 Description = Deployment completed successfully 55 56 Deployed 57 Task Group Desired Placed Healthy Unhealthy Progress Deadline 58 cache 2 2 2 0 2021-06-09T15:20:27-07:00 59 web 2 2 2 0 2021-06-09T15:20:27-07:00 60 ``` 61 62 Inspect the status of a deployment that is waiting for canary promotion: 63 64 ```shell-session 65 $ nomad deployment status 0b 66 ID = 0b23b149 67 Job ID = example 68 Job Version = 1 69 Status = running 70 Description = Deployment is running but requires manual promotion 71 72 Deployed 73 Task Group Promoted Desired Canaries Placed Healthy Unhealthy Progress Deadline 74 cache false 2 1 1 0 0 2021-06-09T15:20:27-07:00 75 web N/A 2 0 2 2 0 2021-06-09T15:20:27-07:00 76 ``` 77 78 Monitor the status of a deployment and its allocations: 79 80 ```shell-session 81 $ nomad deployment status -monitor -verbose dab 82 2021-06-09T15:10:38-07:00: Monitoring deployment "da9bfc23-576f-be32-61c9-0f9997fe70a6" 83 ⠙ Deployment "da9bfc23-576f-be32-61c9-0f9997fe70a6" in progress... 84 85 2021-06-09T15:10:40-07:00 86 ID = da9bfc23-576f-be32-61c9-0f9997fe70a6 87 Job ID = example 88 Job Version = 0 89 Status = running 90 Description = Deployment is running 91 92 Deployed 93 Task Group Desired Placed Healthy Unhealthy Progress Deadline 94 cache 2 2 1 0 2021-06-09T15:20:27-07:00 95 web 1 1 1 0 2021-06-09T15:20:27-07:00 96 97 Allocations 98 ID Eval ID Node ID Node Name Task Group Version Desired Status Created Modified 99 9e1b4cb9-35c4-49f3-3ccb-1cb10a5a5aa6 e337d747-f59e-329e-4718-46edcc293695 70279742-b106-c487-315f-fb583e13178e mbp.local cache 0 run running 2021-06-09T15:10:17-07:00 2021-06-09T15:10:31-07:00 100 bd0a8773-0d37-bca6-6ca1-2d9c8473bdf8 e337d747-f59e-329e-4718-46edcc293695 70279742-b106-c487-315f-fb583e13178e mbp.local cache 0 run running 2021-06-09T15:10:17-07:00 2021-06-09T15:10:29-07:00 101 ee873095-8e76-7d4f-095f-b80ce5712d9b e337d747-f59e-329e-4718-46edcc293695 70279742-b106-c487-315f-fb583e13178e mbp.local web 0 run running 2021-06-09T15:10:17-07:00 2021-06-09T15:10:27-07:00 102 ``` 103 104 Monitor the status of a deployment that fails and has `auto_revert` set to `true`: 105 106 ```shell-session 107 $ nomad deployment status -monitor e45 108 2021-06-09T15:49:19-07:00: Monitoring deployment "e45cc3c1" 109 ! Deployment "e45cc3c1" failed 110 111 2021-06-09T15:49:48-07:00 112 ID = e45cc3c1 113 Job ID = example 114 Job Version = 1 115 Status = failed 116 Description = Failed due to progress deadline - rolling back to job version 0 117 118 Deployed 119 Task Group Auto Revert Desired Placed Healthy Unhealthy Progress Deadline 120 cache true 2 1 0 1 2021-06-09T15:49:48-07:00 121 web false 1 1 1 0 2021-06-09T15:59:28-07:00 122 123 ⠙ Deployment "e094a0be" in progress... 124 125 2021-06-09T15:50:02-07:00 126 ID = e094a0be 127 Job ID = example 128 Job Version = 2 129 Status = running 130 Description = Deployment is running 131 132 Deployed 133 Task Group Auto Revert Desired Placed Healthy Unhealthy Progress Deadline 134 cache true 2 2 1 0 2021-06-09T15:52:00-07:00 135 web false 1 1 1 0 2021-06-09T15:59:58-07:00 136 ``` 137 138 **Please note**: The library used for updating terminal output in place currently isn't fully 139 Windows compatible so there may be some formatting differences (different margins, no spinner 140 indicating deployment is in progress). 141 142 [`auto_revert`]: /docs/job-specification/update#auto_revert