github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/commands/scaling/policy-info.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: scaling policy info'
     4  sidebar_title: policy info
     5  description: |
     6    Display an individual Nomad scaling policy.
     7  ---
     8  
     9  # Command: scaling policy info
    10  
    11  Info is used to return detailed information on the specified scaling policy.
    12  
    13  ## Usage
    14  
    15  ```plaintext
    16  nomad scaling policy info [options] <policy_id>
    17  ```
    18  
    19  If ACLs are enabled, this command requires a token with the `read-job` and
    20  `list-jobs` capabilities for the policy's namespace.
    21  
    22  ## General Options
    23  
    24  @include 'general_options.mdx'
    25  
    26  ## Policy Info Options
    27  
    28  - `-json` : Output the scaling policy in its JSON format.
    29  - `-t` : Format and display the scaling policy using a Go template.
    30  
    31  ## Examples
    32  
    33  Inspect an individual scaling policy:
    34  
    35  ```shell-session
    36  $ nomad scaling policy info 31a53813-24df-b2ad-77dc-1b4bad4e7dca
    37  
    38  ID      = 31a53813-24df-b2ad-77dc-1b4bad4e7dca
    39  Enabled = true
    40  Target  = Namespace:default,Job:webapp,Group:demo
    41  Min     = 1
    42  Max     = 20
    43  
    44  Policy:
    45  {
    46      "check": [
    47          {
    48              "avg_sessions": [
    49                  {
    50                      "query": "scalar(sum(traefik_entrypoint_open_connections{entrypoint=\"horizontal-webapp\"}))",
    51                      "source": "prometheus",
    52                      "strategy": [
    53                          {
    54                              "target-value": [
    55                                  {
    56                                      "target": 10.0
    57                                  }
    58                              ]
    59                          }
    60                      ]
    61                  }
    62              ]
    63          }
    64      ],
    65      "cooldown": "1m",
    66      "evaluation_interval": "30s"
    67  }
    68  ```