--- layout: docs page_title: CLI sidebar_title: CLI description: > The Nomad Autoscaler can be controlled via a command-line interface. This page documents all the commands the Nomad Autoscaler accepts. --- # Nomad Autoscaler Command: agent The agent command is used to start the Nomad Autoscaler which runs until an interrupt signal is received. The Nomad Autoscaler agent's configuration primarily comes from the config files used, but a subset of the options may also be passed directly as CLI arguments. See the [Nomad Autoscaler Agent guide][nomad_autoscaler_agent_guide] for more information on how to use this command and the options it has. ## Command-line Options A subset of the available Nomad Autoscaler agent configuration can optionally be passed in via CLI arguments. The `agent` command accepts the following arguments: - `-config=`: The path to either a single config file or a directory of config files to use for configuring the Nomad Autoscaler agent. - `-log-level=`: Specify the verbosity level of Nomad Autoscaler's logs. Valid values include `DEBUG`, `INFO`, and `WARN`, in decreasing order of verbosity. The default is `INFO`. - `-log-json`: Output logs in a JSON format. The default is `false`. - `-plugin-dir=`: The plugin directory is used to discover Nomad Autoscaler plugins. If not specified, the plugin directory defaults to be that of `/plugins/`. - `-http-bind-address=`: The HTTP address that the health server will bind to. The default is `127.0.0.1`. - `-http-bind-port=`: The port that the health server will bind to. The default is `8080`. - `-nomad-address=`: The address of the Nomad server in the form of `protocol://addr:port`. The default is `http://127.0.0.1:4646`. - `-nomad-region=`: The region of the Nomad servers to connect with. - `-nomad-namespace=`: The target namespace for queries and actions bound to a namespace. - `-nomad-token=`: The SecretID of an ACL token to use to authenticate API requests with. - `-nomad-http-auth=`: The authentication information to use when connecting to a Nomad API which is using HTTP authentication. - `-nomad-ca-cert=`: Path to a PEM encoded CA cert file to use to verify the Nomad server SSL certificate. - `-nomad-ca-path=`: Path to a directory of PEM encoded CA cert files to verify the Nomad server SSL certificate. If both `-nomad-ca-cert` and `-nomad-ca-path` are specified, `-nomad-ca-cert` is used. - `-nomad-client-cert=`: Path to a PEM encoded client certificate for TLS authentication to the Nomad server. Must also specify `-nomad-client-key`. - `-nomad-client-key=`: Path to an unencrypted PEM encoded private key matching the client certificate from `-nomad-client-cert`. - `-nomad-tls-server-name=`: The server name to use as the SNI host when connecting via TLS. - `-nomad-skip-verify`: Do not verify TLS certificates. This is strongly discouraged. - `-policy-dir=`: The path to a directory used to load scaling policies. - `-policy-default-cooldown=`: The default cooldown that will be applied to all scaling policies which do not specify a cooldown period. The default is `5m`. - `-policy-default-evaluation-interval=`: The default evaluation interval that will be applied to all scaling policies which do not specify an evaluation interval. The default is `10s`. - `-telemetry-disable-hostname`: Specifies whether gauge values should be prefixed with the local hostname. - `-telemetry-enable-hostname-label`: Enable adding hostname to metric labels. - `-telemetry-collection-interval=`: Specifies the time interval at which the agent collects telemetry data. The default is 1s. - `-telemetry-statsite-address=`: The address of the statsite aggregation server. - `-telemetry-statsd-address=`: The address of the statsd aggregation. - `-telemetry-dogstatsd-address=`: The address of the Datadog statsd server. - `-telemetry-dogstatsd-tag=`: A list of global tags that will be added to all telemetry packets sent to DogStatsD. - `-telemetry-prometheus-metrics`: Indicates whether the agent should make Prometheus formatted metrics available. Defaults to `false`. - `-telemetry-prometheus-retention-time=`: The time to retain Prometheus metrics before they are expired and untracked. - `-telemetry-circonus-api-token`: A valid API Token used to create/manage check. If provided, metric management is enabled. - `-telemetry-circonus-api-app`: The app name associated with API token. Defaults to `nomad_autoscaler`. - `-telemetry-circonus-api-url`: The base URL to use for contacting the Circonus API. Defaults to `https://api.circonus.com/v2`. - `-telemetry-circonus-submission-interval`: The interval at which metrics are submitted to Circonus. Defaults to `10s`. - `-telemetry-circonus-submission-url`: The check.config.submission_url field from a previously created HTTPTrap check. - `-telemetry-circonus-check-id`: The check id from a previously created HTTPTRAP check. The numeric portion of the check._cid field. - `-telemetry-circonus-check-force-metric-activation`: Force enabling metrics, as they are encountered, if the metric already exists and is NOT active. If check management is enabled, the default behavior is to add new metrics as they are encountered. - `-telemetry-circonus-check-instance-id`: Uniquely identify the metrics coming from this agent. Defaults to `hostname:app`. - `-telemetry-circonus-check-search-tag`: A special tag that helps to narrow down the search results when neither a submission URL or check ID are provided. Defaults to `service:app`. - `-telemetry-circonus-check-tags`: A comma separated list of tags to apply to the check. The value of `-telemetry-circonus-check-search-tag` will always be added to the check. - `-telemetry-circonus-check-display-name`: The name used for the Circonus check that will be displayed in the UI. This defaults to the value of `-telemetry-circonus-check-instance-id`. - `-telemetry-circonus-broker-id`: The Circonus broker to use when creating a new check. - `-telemetry-circonus-broker-select-tag`: A tag which is used to select a broker ID when an explicit broker ID is not provided. # Nomad Autoscaler Command: version The `version` command displays build information about the running binary, including the release version and the exact revision. ## Usage ```plaintext nomad-autoscaler version ``` ## Output This command prints both the version number as well as the exact commit SHA used during the build. The SHA may also have the string `+CHANGES` appended to the end, indicating that local, uncommitted changes were detected at build time. ## Examples ```shell-session $ nomad-autoscaler version Nomad Autoscaler v0.0.3-dev (da91fa9) ``` [nomad_autoscaler_agent_guide]: /docs/autoscaling/agent