github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/autoscaling/cli.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: CLI
     4  sidebar_title: CLI
     5  description: >
     6    The Nomad Autoscaler can be controlled via a command-line interface. This
     7    page documents all the commands the Nomad Autoscaler accepts.
     8  ---
     9  
    10  # Nomad Autoscaler Command: agent
    11  
    12  The agent command is used to start the Nomad Autoscaler which runs until an
    13  interrupt signal is received. The Nomad Autoscaler agent's configuration
    14  primarily comes from the config files used, but a subset of the options may
    15  also be passed directly as CLI arguments. See the
    16  [Nomad Autoscaler Agent guide][nomad_autoscaler_agent_guide] for more information
    17  on how to use this command and the options it has.
    18  
    19  ## Command-line Options
    20  
    21  A subset of the available Nomad Autoscaler agent configuration can optionally be
    22  passed in via CLI arguments. The `agent` command accepts the following arguments:
    23  
    24  - `-config=<path>`: The path to either a single config file or a directory of
    25    config files to use for configuring the Nomad Autoscaler agent.
    26  
    27  - `-log-level=<level>`: Specify the verbosity level of Nomad Autoscaler's logs.
    28    Valid values include `DEBUG`, `INFO`, and `WARN`, in decreasing order of verbosity.
    29    The default is `INFO`.
    30  
    31  - `-log-json`: Output logs in a JSON format. The default is `false`.
    32  
    33  - `-plugin-dir=<path>`: The plugin directory is used to discover Nomad Autoscaler
    34    plugins. If not specified, the plugin directory defaults to be that of
    35    `<current-dir>/plugins/`.
    36  
    37  - `-http-bind-address=<addr>`: The HTTP address that the health server will bind
    38    to. The default is `127.0.0.1`.
    39  
    40  - `-http-bind-port=<port>`: The port that the health server will bind to. The
    41    default is `8080`.
    42  
    43  - `-nomad-address=<addr>`: The address of the Nomad server in the form of
    44    `protocol://addr:port`. The default is `http://127.0.0.1:4646`.
    45  
    46  - `-nomad-region=<region>`: The region of the Nomad servers to connect with.
    47  
    48  - `-nomad-namespace=<namespace>`: The target namespace for queries and actions
    49    bound to a namespace.
    50  
    51  - `-nomad-token=<token>`: The SecretID of an ACL token to use to authenticate
    52    API requests with.
    53  
    54  - `-nomad-http-auth=<username:password>`: The authentication information to use
    55    when connecting to a Nomad API which is using HTTP authentication.
    56  
    57  - `-nomad-ca-cert=<path>`: Path to a PEM encoded CA cert file to use to verify
    58    the Nomad server SSL certificate.
    59  
    60  - `-nomad-ca-path=<path>`: Path to a directory of PEM encoded CA cert files to
    61    verify the Nomad server SSL certificate. If both `-nomad-ca-cert` and
    62    `-nomad-ca-path` are specified, `-nomad-ca-cert` is used.
    63  
    64  - `-nomad-client-cert=<path>`: Path to a PEM encoded client certificate for TLS
    65    authentication to the Nomad server. Must also specify `-nomad-client-key`.
    66  
    67  - `-nomad-client-key=<path>`: Path to an unencrypted PEM encoded private key
    68    matching the client certificate from `-nomad-client-cert`.
    69  
    70  - `-nomad-tls-server-name=<name>`: The server name to use as the SNI host when
    71    connecting via TLS.
    72  
    73  - `-nomad-skip-verify`: Do not verify TLS certificates. This is strongly discouraged.
    74  
    75  - `-policy-dir=<path>`: The path to a directory used to load scaling policies.
    76  
    77  - `-policy-default-cooldown=<dur>`: The default cooldown that will be applied to
    78    all scaling policies which do not specify a cooldown period. The default is `5m`.
    79  
    80  - `-policy-default-evaluation-interval=<dur>`: The default evaluation interval
    81    that will be applied to all scaling policies which do not specify an evaluation
    82    interval. The default is `10s`.
    83  
    84  - `-telemetry-disable-hostname`: Specifies whether gauge values should be prefixed
    85    with the local hostname.
    86  
    87  - `-telemetry-enable-hostname-label`: Enable adding hostname to metric labels.
    88  
    89  - `-telemetry-collection-interval=<dur>`: Specifies the time interval at which
    90    the agent collects telemetry data. The default is 1s.
    91  
    92  - `-telemetry-statsite-address=<addr>`: The address of the statsite aggregation
    93    server.
    94  
    95  - `-telemetry-statsd-address=<addr>`: The address of the statsd aggregation.
    96  
    97  - `-telemetry-dogstatsd-address=<addr>`: The address of the Datadog statsd server.
    98  
    99  - `-telemetry-dogstatsd-tag=<tag_list>`: A list of global tags that will be added
   100    to all telemetry packets sent to DogStatsD.
   101  
   102  - `-telemetry-prometheus-metrics`: Indicates whether the agent should make Prometheus
   103    formatted metrics available. Defaults to `false`.
   104  
   105  - `-telemetry-prometheus-retention-time=<dur>`: The time to retain Prometheus
   106    metrics before they are expired and untracked.
   107  
   108  - `-telemetry-circonus-api-token`: A valid API Token used to create/manage check.
   109    If provided, metric management is enabled.
   110  
   111  - `-telemetry-circonus-api-app`: The app name associated with API token. Defaults
   112    to `nomad_autoscaler`.
   113  
   114  - `-telemetry-circonus-api-url`: The base URL to use for contacting the Circonus
   115    API. Defaults to `https://api.circonus.com/v2`.
   116  
   117  - `-telemetry-circonus-submission-interval`: The interval at which metrics are
   118    submitted to Circonus. Defaults to `10s`.
   119  
   120  - `-telemetry-circonus-submission-url`: The check.config.submission_url field
   121    from a previously created HTTPTrap check.
   122  
   123  - `-telemetry-circonus-check-id`: The check id from a previously created HTTPTRAP
   124    check. The numeric portion of the check.\_cid field.
   125  
   126  - `-telemetry-circonus-check-force-metric-activation`: Force enabling metrics,
   127    as they are encountered, if the metric already exists and is NOT active. If
   128    check management is enabled, the default behavior is to add new metrics as
   129    they are encountered.
   130  
   131  - `-telemetry-circonus-check-instance-id`: Uniquely identify the metrics coming
   132    from this agent. Defaults to `hostname:app`.
   133  
   134  - `-telemetry-circonus-check-search-tag`: A special tag that helps to narrow
   135    down the search results when neither a submission URL or check ID are provided.
   136    Defaults to `service:app`.
   137  
   138  - `-telemetry-circonus-check-tags`: A comma separated list of tags to apply to
   139    the check. The value of `-telemetry-circonus-check-search-tag` will always be
   140    added to the check.
   141  
   142  - `-telemetry-circonus-check-display-name`: The name used for the Circonus check
   143    that will be displayed in the UI. This defaults to the value of
   144    `-telemetry-circonus-check-instance-id`.
   145  
   146  - `-telemetry-circonus-broker-id`: The Circonus broker to use when creating a
   147    new check.
   148  
   149  - `-telemetry-circonus-broker-select-tag`: A tag which is used to select a broker
   150    ID when an explicit broker ID is not provided.
   151  
   152  # Nomad Autoscaler Command: version
   153  
   154  The `version` command displays build information about the running binary,
   155  including the release version and the exact revision.
   156  
   157  ## Usage
   158  
   159  ```plaintext
   160  nomad-autoscaler version
   161  ```
   162  
   163  ## Output
   164  
   165  This command prints both the version number as well as the exact commit SHA used
   166  during the build. The SHA may also have the string `+CHANGES` appended to the
   167  end, indicating that local, uncommitted changes were detected at build time.
   168  
   169  ## Examples
   170  
   171  ```shell-session
   172  $ nomad-autoscaler version
   173  Nomad Autoscaler v0.0.3-dev (da91fa9)
   174  ```
   175  
   176  [nomad_autoscaler_agent_guide]: /docs/autoscaling/agent