open-nomad/website/content/docs/commands/job/scaling-events.mdx
Luiz Aoqui 1aceff7806
cli: remove hard requirement on list-jobs (#16380)
Most job subcommands allow for job ID prefix match as a convenience
functionality so users don't have to type the full job ID.

But this introduces a hard ACL requirement that the token used to run
these commands have the `list-jobs` permission, even if the token has
enough permission to execute the basic command action and the user
passed an exact job ID.

This change softens this requirement by not failing the prefix match in
case the request results in a permission denied error and instead using
the information passed by the user directly.
2023-03-09 15:00:04 -05:00

54 lines
1.6 KiB
Plaintext

---
layout: docs
page_title: 'Commands: job scaling-events'
description: |
The job scaling-events command details scaling events for a given job.
---
# Command: job scaling-events
The `job scaling-events` command is used display the recent scaling events for
a given job.
## Usage
```plaintext
nomad job scaling-events [options] <job>
```
The `job scaling-events` command requires a single argument, a submitted job's
ID, and will output the stored scaling events for the job if there are any.
When ACLs are enabled, this command requires a token with either the
`read-job` or `read-job-scaling` capability for the job's namespace. The
`list-jobs` capability is required to run the command with a job prefix
instead of the exact job ID.
## General Options
@include 'general_options.mdx'
## Scaling-Events Options
- `-verbose`: Show full information.
## Examples
Display the scaling events for the job with ID "job1":
```shell-session
$ nomad job scaling-events job1
Task Group Count PrevCount Date
group1 8 8 2020-10-23T09:06:47+02:00
group1 8 3 2020-10-23T09:02:42+02:00
```
Display the scaling events for the job with ID "job1" using the `verbose` flag:
```shell-session
$ nomad job scaling-events -verbose job1
Task Group Count PrevCount Error Message Eval ID Date
group1 8 8 false submitted using the Nomad CLI b754d6b3-8960-5652-60d8-d47df6eaed13 2020-10-23T09:06:47+02:00
group1 8 3 false submitted using the Nomad CLI 529cc88e-8887-725e-2a79-4997f50df153 2020-10-23T09:02:42+02:00
```