Skip to content

Commit ca56b3b

Browse files
[Docs] Events #3397 (#3506)
* [Docs] Events #3397 * Update docs/docs/concepts/events.md Co-authored-by: jvstme <36324149+jvstme@users.noreply.github.com> * Update docs/docs/concepts/events.md Co-authored-by: jvstme <36324149+jvstme@users.noreply.github.com> * Update docs/docs/concepts/events.md Co-authored-by: jvstme <36324149+jvstme@users.noreply.github.com> * Update docs/docs/concepts/events.md Co-authored-by: jvstme <36324149+jvstme@users.noreply.github.com> * Update docs/docs/concepts/events.md Co-authored-by: jvstme <36324149+jvstme@users.noreply.github.com> * Update docs/docs/concepts/events.md Co-authored-by: jvstme <36324149+jvstme@users.noreply.github.com> --------- Co-authored-by: jvstme <36324149+jvstme@users.noreply.github.com>
1 parent b93476e commit ca56b3b

File tree

3 files changed

+75
-4
lines changed

3 files changed

+75
-4
lines changed

docs/docs/concepts/events.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Events
2+
3+
Events provide a chronological record of notable state changes and operations affecting `dstack` resources. They are designed for auditing, debugging, and understanding the lifecycle of runs, jobs, fleets, and other resources.
4+
5+
Each event includes the following fields:
6+
7+
| Field | Description |
8+
| --------- | ----------------------------------------------------------- |
9+
| Timestamp | When the event occurred |
10+
| Actor | The user or system that initiated the change, if applicable |
11+
| Targets | The resources affected by the event |
12+
| Message | A description of the change or additional event details |
13+
14+
Events can be queried by targeting a specific resource or within a group of related resources. For example, you can query events targeting a particular job, or query events within a run, including the run itself and all of its jobs.
15+
16+
Events are accessible through the UI, CLI, and API.
17+
18+
## UI
19+
20+
The UI allows you to query events either globally on the dedicated `Events` page or within a specific group on the page of a run, job, fleet, and other resources.
21+
22+
### Global page
23+
24+
The global page shows events from all projects that the user has access to and allows filtering by many fields.
25+
26+
![](https://dstack.ai/static-assets/static-assets/images/dstack-ui-events-global.png){ width=800 }
27+
28+
This page allows you to query events targeting a specific resource or within a particular group.
29+
30+
### Resource page
31+
32+
The resource page shows events within that specific group. For example, if you open a run and switch to the `Events` tab, you will see all events about that run and its jobs.
33+
34+
![](https://dstack.ai/static-assets/static-assets/images/dstack-ui-events-run.png){ width=800 }
35+
36+
## CLI
37+
38+
To query events via the CLI, use the `dstack event` command. This command provides several arguments that allow filtering by target and within scopes.
39+
40+
Here is an example of querying all events within a particular run:
41+
42+
<div class="termy">
43+
44+
```shell
45+
$ dstack event --within-run cursor
46+
47+
[2026-01-21 13:09:37] [👤admin] [run cursor] Run submitted. Status: SUBMITTED
48+
[2026-01-21 13:09:37] [job cursor-0-0] Job created on run submission. Status: SUBMITTED
49+
[2026-01-21 13:09:57] [job cursor-0-0] Job status changed SUBMITTED -> PROVISIONING
50+
[2026-01-21 13:09:58] [job cursor-0-0, instance some-fleet-0] Instance created for job. Instance status: PROVISIONING
51+
[2026-01-21 13:09:59] [run cursor] Run status changed SUBMITTED -> PROVISIONING
52+
[2026-01-21 13:11:22] [job cursor-0-0] Job status changed PROVISIONING -> PULLING
53+
[2026-01-21 13:11:49] [job cursor-0-0] Job status changed PULLING -> RUNNING
54+
[2026-01-21 13:11:51] [run cursor] Run status changed PROVISIONING -> RUNNING
55+
[2026-01-21 13:18:41] [👤admin] [run cursor] Run status changed RUNNING -> TERMINATING. Termination reason: STOPPED_BY_USER
56+
[2026-01-21 13:18:48] [job cursor-0-0] Job status changed RUNNING -> TERMINATING. Termination reason: TERMINATED_BY_USER
57+
[2026-01-21 13:19:05] [instance some-fleet-0, job cursor-0-0] Job unassigned from instance. Instance blocks: 0/1 busy
58+
[2026-01-21 13:19:05] [job cursor-0-0] Job status changed TERMINATING -> TERMINATED
59+
[2026-01-21 13:19:07] [run cursor] Run status changed TERMINATING -> TERMINATED
60+
```
61+
62+
</div>
63+
64+
To see all supported arguments, check the [reference](../reference/cli/dstack/event.md).
65+
66+
If you invoke the command without arguments, it will include all events targeting resources in the project.
67+
68+
## TTL
69+
70+
By default, `dstack` stores each event for 30 days and then deletes it. This can be overridden by server administrators using the `DSTACK_SERVER_EVENTS_TTL_SECONDS` environment variable.

docs/docs/reference/cli/dstack/event.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# dstack event
22

3-
The `dstack event` command (an alias for `dstack event list`) allows you to view events.
4-
5-
<!-- TODO: hyperlink to concepts/events.md -->
3+
The `dstack event` command, an alias for `dstack event list`, allows you to view events.
64

5+
For more details, see [Events](../../../concepts/events.md).
76

87
## Usage
98

mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ plugins:
7777
- docs/concepts/gateways.md: How to manage gateways - enabling auto-scaling, rate limits, and custom domains
7878
- docs/concepts/secrets.md: How to manage secrets - for API keys or other sensitive data
7979
- docs/concepts/projects.md: How to manage projects - for managing separate teams
80-
- docs/concepts/metrics.md: How to manage gateways - enabling auto-scaling, rate limits, and custom domains
80+
- docs/concepts/metrics.md: How to access metrics - for monitoring of runs/jobs/fleets, hardware usage (e.g. GPU util), etc
81+
- docs/concepts/events.md: How to access events - aka audit log - for tracking state changes, resource creation/deletion, etc
8182
Guides:
8283
- docs/guides/server-deployment.md: Detailed guide on how to deploy the dstack server
8384
- docs/guides/troubleshooting.md: Common issues and how to troubleshoot them
@@ -271,6 +272,7 @@ nav:
271272
- Secrets: docs/concepts/secrets.md
272273
- Projects: docs/concepts/projects.md
273274
- Metrics: docs/concepts/metrics.md
275+
- Events: docs/concepts/events.md
274276
- Guides:
275277
- Server deployment: docs/guides/server-deployment.md
276278
- Troubleshooting: docs/guides/troubleshooting.md

0 commit comments

Comments
 (0)