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