github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/job/inspect.mdx (about) 1 --- 2 layout: docs 3 page_title: 'Commands: job inspect' 4 description: | 5 The job inspect command is used to inspect a submitted job. 6 --- 7 8 # Command: job inspect 9 10 **Alias: `nomad inspect`** 11 12 The `job inspect` command is used to inspect the content of a submitted job. 13 14 ## Usage 15 16 ```plaintext 17 nomad job inspect [options] <job> 18 ``` 19 20 The `job inspect` command requires a single argument, a submitted job's name, and 21 will retrieve the JSON version of the job. This JSON is valid to be submitted to 22 the [Job HTTP API]. This command is useful to inspect what version of a job 23 Nomad is running. 24 25 When ACLs are enabled, this command requires a token with the `read-job` and 26 `list-jobs` capabilities for the job's namespace. 27 28 ## General Options 29 30 @include 'general_options.mdx' 31 32 ## Inspect Options 33 34 - `-version`: Display only the job at the given job version. 35 - `-json` : Output the job in its JSON format. 36 - `-t` : Format and display the job using a Go template. 37 38 ## Examples 39 40 Inspect a submitted job: 41 42 ```shell-session 43 $ nomad job inspect redis 44 { 45 "Job": { 46 "Region": "global", 47 "ID": "redis 48 "Name": "redis 49 "Type": "service", 50 "Priority": 50, 51 "AllAtOnce": false, 52 "Datacenters": [ 53 "dc1" 54 ], 55 "Constraints": [ 56 { 57 "LTarget": "${attr.kernel.name}", 58 "RTarget": "linux", 59 "Operand": "=" 60 } 61 ], 62 "TaskGroups": [ 63 { 64 "Name": "cache", 65 "Count": 1, 66 "Constraints": null, 67 "Tasks": [ 68 { 69 "Name": "redis", 70 "Driver": "docker", 71 "User": "", 72 "Config": { 73 "image": "redis:latest", 74 "port_map": [ 75 { 76 "db": 6379 77 } 78 ] 79 }, 80 "Constraints": null, 81 "Env": null, 82 "Services": [ 83 { 84 "Id": "", 85 "Name": "cache-redis", 86 "Tags": [ 87 "global", 88 "cache" 89 ], 90 "PortLabel": "db", 91 "Checks": [ 92 { 93 "Id": "", 94 "Name": "alive", 95 "Type": "tcp", 96 "Command": "", 97 "Args": null, 98 "Path": "", 99 "Protocol": "", 100 "Interval": 10000000000, 101 "Timeout": 2000000000 102 } 103 ] 104 } 105 ], 106 "Resources": { 107 "CPU": 500, 108 "MemoryMB": 256, 109 "DiskMB": 300, 110 "Networks": [ 111 { 112 "Public": false, 113 "CIDR": "", 114 "ReservedPorts": null, 115 "DynamicPorts": [ 116 { 117 "Label": "db", 118 "Value": 0 119 } 120 ], 121 "IP": "", 122 "MBits": 10 123 } 124 ] 125 }, 126 "Meta": null, 127 "KillTimeout": 5000000000, 128 "LogConfig": { 129 "MaxFiles": 10, 130 "MaxFileSizeMB": 10 131 }, 132 "Artifacts": null 133 } 134 ], 135 "RestartPolicy": { 136 "Interval": 300000000000, 137 "Attempts": 10, 138 "Delay": 25000000000, 139 "Mode": "delay" 140 }, 141 "Meta": null 142 } 143 ], 144 "Update": { 145 "Stagger": 10000000000, 146 "MaxParallel": 1 147 }, 148 "Periodic": null, 149 "Meta": null, 150 "Status": "running", 151 "StatusDescription": "", 152 "CreateIndex": 5, 153 "ModifyIndex": 7 154 } 155 } 156 ``` 157 158 [job http api]: /api-docs/jobs