github.com/smintz/nomad@v0.8.3/website/source/docs/commands/job/inspect.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: job inspect"
     4  sidebar_current: "docs-commands-job-inspect"
     5  description: >
     6    The job inspect command is used to inspect a submitted job.
     7  ---
     8  
     9  # Command: job inspect
    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  ```
    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](/api/jobs.html). This command is useful to inspect what
    23  version of a job Nomad is running.
    24  
    25  ## General Options
    26  
    27  <%= partial "docs/commands/_general_options" %>
    28  
    29  ## Inspect Options
    30  
    31  * `-version`: Display only the job at the given job version.
    32  
    33  * `-json` : Output the job in its JSON format.
    34  
    35  * `-t` : Format and display the job using a Go template.
    36  
    37  ## Examples
    38  
    39  Inspect a submitted job:
    40  
    41  ```
    42  $ nomad job inspect redis
    43  {
    44      "Job": {
    45          "Region": "global",
    46          "ID": "redis
    47          "Name": "redis
    48          "Type": "service",
    49          "Priority": 50,
    50          "AllAtOnce": false,
    51          "Datacenters": [
    52              "dc1"
    53          ],
    54          "Constraints": [
    55              {
    56                  "LTarget": "${attr.kernel.name}",
    57                  "RTarget": "linux",
    58                  "Operand": "="
    59              }
    60          ],
    61          "TaskGroups": [
    62              {
    63                  "Name": "cache",
    64                  "Count": 1,
    65                  "Constraints": null,
    66                  "Tasks": [
    67                      {
    68                          "Name": "redis",
    69                          "Driver": "docker",
    70                          "User": "",
    71                          "Config": {
    72                              "image": "redis:latest",
    73                              "port_map": [
    74                                  {
    75                                      "db": 6379
    76                                  }
    77                              ]
    78                          },
    79                          "Constraints": null,
    80                          "Env": null,
    81                          "Services": [
    82                              {
    83                                  "Id": "",
    84                                  "Name": "cache-redis",
    85                                  "Tags": [
    86                                      "global",
    87                                      "cache"
    88                                  ],
    89                                  "PortLabel": "db",
    90                                  "Checks": [
    91                                      {
    92                                          "Id": "",
    93                                          "Name": "alive",
    94                                          "Type": "tcp",
    95                                          "Command": "",
    96                                          "Args": null,
    97                                          "Path": "",
    98                                          "Protocol": "",
    99                                          "Interval": 10000000000,
   100                                          "Timeout": 2000000000
   101                                      }
   102                                  ]
   103                              }
   104                          ],
   105                          "Resources": {
   106                              "CPU": 500,
   107                              "MemoryMB": 256,
   108                              "DiskMB": 300,
   109                              "IOPS": 0,
   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  ```