---
title: "Trails events"
description: "The events Fleets records in Trails for nodes, sessions, command runs and scripts, including how each session ended and each node's result."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Trails events

Fleets records its events in [Trails](/trails) with `eventSource` `fleets.ezghcloud.com`. Trails
is Fleets' audit trail: who opened a shell on which node, as which account, when and why it ended,
and which commands and scripts ran where with what exit code. Reads such as `ListNodes` and
`GetSession` aren't recorded, as everywhere in Trails.

| Event | Recorded when | Who |
| --- | --- | --- |
| `RegisterNode` | A machine registers as a node | The node bot (with the instance, for an EZGH instance) |
| `UpdateNode`, `ResetNode`, `DeregisterNode` | A node is renamed or retagged, reset or deregistered | The caller |
| `StartSession` | Someone starts a session, with the node and the account | The caller |
| `ResumeSession` | A console tab or `ezgh` reconnects to a session | The caller |
| `TerminateSession` | Someone terminates a session | The caller |
| `EndSession` | A session ends, for any reason | Fleets (`ServiceEvent`) |
| `SendCommand` | Someone creates a command run, with its targets, account, and script and version | The caller |
| `CancelCommand` | Someone cancels a command run | The caller |
| `CompleteCommandInvocation` | One node's part of a run ends | Fleets (`ServiceEvent`) |
| `CreateScript`, `UpdateScript`, `CreateScriptVersion`, `DeleteScript` | A script changes | The caller |
| `UpdateSettings` | The project's Fleets settings change | The caller |

- **`EndSession`** holds the session, node, account, the person who started it (`startedBy`), the
  [end reason](/fleets/connect#how-a-session-ends) and the start and end times. A session's
  `revoked` end is how a removed permission shows.
- **`CompleteCommandInvocation`** holds the run, node, status, exit code, start and end times and
  the person who sent the run (`sentBy`). A run on 1,000 nodes is 1,000 events.
- **`SendCommand`** never records command text or parameter values: they're replaced with
  `HIDDEN_DUE_TO_SECURITY_REASONS`. The run's page shows the command for 30 days.
- Nothing typed or shown in a session is recorded, and keepalives aren't recorded.
- Session tickets are never recorded.

Trails keeps events for 30 days. To keep them longer, [deliver them to Observability](/trails/deliveries).

Source: https://docs.ezghcloud.com/fleets/trails/index.mdx
