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

# Incidents

> Lijst, doorzoek, inspecteer en triageer exception-, performance- en anomalie-incidenten vanuit de terminal.

Met de CLI kunt u incidenten afhandelen zonder de web-UI te openen. U kunt incidenten over alle types of per type opsommen, ze filteren op status, namespace of action, de details van één incident openen, de status of severity ervan bijwerken en notities toevoegen.

Elk `incidents`-commando richt zich op één applicatie, geïdentificeerd door naam en omgeving (`--app "MyApp" --environment production`) of door ID (`--app-id <APP_ID>`, het lange hexadecimale app-ID uit `appsignal-cli apps list`). De flag `--environment` is alleen nodig wanneer meerdere apps een naam delen. Voeg `--org` toe om uw standaardorganisatie te overschrijven. Zie [Apps en organisaties](/cli/apps) voor hoe apps worden geïdentificeerd.

## Incidenten opsommen

Om recente incidenten van alle types voor een app op te sommen:

```sh Shell theme={null}
appsignal-cli incidents list --app "MyApp" --environment production --limit 5
```

Standaard retourneren de list-commando's de 10 meest recente incidenten, geordend op meest recente activiteit.

### Opsommen per type

Drie commando's beperken de resultaten tot één incidenttype:

```sh Shell theme={null}
# Exception incidents
appsignal-cli incidents list-exceptions --app "MyApp" --environment production

# Performance incidents
appsignal-cli incidents list-performance --app "MyApp" --environment production

# Anomaly detection incidents
appsignal-cli incidents list-anomalies --app "MyApp" --environment production
```

## Filteren en zoeken

De list-commando's delen een set filters:

| Flag              | Beschrijving                                                                         |
| ----------------- | ------------------------------------------------------------------------------------ |
| `--state <STATE>` | Filter op status: `OPEN`, `CLOSED` of `WIP`                                          |
| `--order <ORDER>` | Sorteer op `LAST` (meest recente activiteit, de standaard) of `ID` (aanmaakvolgorde) |
| `--limit <N>`     | Maximaal aantal resultaten (standaard: 10)                                           |
| `--offset <N>`    | Aantal over te slaan resultaten, voor paginering                                     |

`incidents list`, `list-exceptions` en `list-performance` accepteren ook:

| Flag                  | Beschrijving                                                   |
| --------------------- | -------------------------------------------------------------- |
| `--namespaces <list>` | Filter op namespaces, kommagescheiden (bijv. `web,background`) |
| `--action <name>`     | Filter op action-naam (bijv. `UsersController#show`)           |

Exception- en performance-incidenten ondersteunen een tekstueel zoeken over de incidentnaam of het bericht met `--query`:

```sh Shell theme={null}
appsignal-cli incidents list-exceptions --app "MyApp" --environment production --query "TimeoutError"
```

U kunt meerdere filters in één commando doorgeven, en ze worden allemaal samen toegepast om de resultaten te verfijnen. Bijvoorbeeld, som alleen de open exceptions op in de `web`-namespace:

```sh Shell theme={null}
appsignal-cli incidents list-exceptions --app "MyApp" --environment production \
  --state OPEN --namespaces web
```

<Note>
  De list-commando's retourneren recente incidenten, dus oudere kunnen mogelijk niet verschijnen, zelfs als ze nog open zijn. Om een specifiek incident te openen ongeacht de leeftijd, gebruikt u `incidents show` met het bijbehorende nummer.
</Note>

## Een incident tonen

Om de volledige details van één incident te zien, geeft u het nummer ervan mee:

```sh Shell theme={null}
appsignal-cli incidents show --number 42 --app "MyApp" --environment production
```

## Een incident bijwerken

Werk de status, severity, toegewezen personen of beschrijving van een incident bij op nummer:

```sh Shell theme={null}
appsignal-cli incidents update --number 42 --app "MyApp" --environment production --state CLOSED
```

| Flag                        | Beschrijving                                                                       |
| --------------------------- | ---------------------------------------------------------------------------------- |
| `--state <STATE>`           | Nieuwe status: `OPEN`, `CLOSED` of `WIP`                                           |
| `--severity <SEV>`          | Nieuwe severity: `UNTRIAGED`, `CRITICAL`, `HIGH`, `LOW`, `NONE` of `INFORMATIONAL` |
| `--assign <NAMES_OR_IDS>`   | Gebruikersnamen of ID's om als toegewezenen toe te voegen, kommagescheiden         |
| `--assign-me`               | Wijs het incident toe aan uw geauthenticeerde gebruiker                            |
| `--unassign <NAMES_OR_IDS>` | Gebruikersnamen of ID's om uit toegewezenen te verwijderen, kommagescheiden        |
| `--description <text>`      | Nieuwe beschrijving                                                                |

Om meerdere incidenten tegelijk te wijzigen, geeft u een kommagescheiden lijst van nummers door. Bulkupdates ondersteunen momenteel alleen `--state`:

```sh Shell theme={null}
appsignal-cli incidents update --number 41,42,43 --app "MyApp" --environment production --state CLOSED
```

### Een incident toewijzen

Om een incident aan uzelf toe te wijzen, gebruikt u `--assign-me`. Er is geen gebruikers-ID voor nodig:

```sh Shell theme={null}
appsignal-cli incidents update --number 42 --app "MyApp" --environment production --assign-me
```

Om andere personen toe te wijzen, geeft u hun namen of gebruikers-ID's door aan `--assign`, kommagescheiden. Een gebruikers-ID is een lange hexadecimale string. Vind namen en ID's met [`apps resources users`](/cli/apps), dat de naam, het ID en het e-mailadres van elke gebruiker toont:

```sh Shell theme={null}
appsignal-cli apps resources users --app "MyApp" --environment production
```

Geef vervolgens één of meer door aan `--assign`:

```sh Shell theme={null}
appsignal-cli incidents update --number 42 --app "MyApp" --environment production \
  --assign <NAME_OR_ID>
```

Om toegewezenen te verwijderen, geeft u hun namen of ID's op dezelfde manier door aan `--unassign`.

## Een notitie toevoegen

Om vast te leggen wat u op een incident heeft ontdekt:

```sh Shell theme={null}
appsignal-cli incidents add-note --number 42 --app "MyApp" --environment production \
  --content "Root cause identified."
```

## JSON-output

Zoals elk commando accepteren de incidents-commando's de globale flag `--output json` (of `--format json`), die machineleesbare output retourneert voor scripts en AI-agents:

```sh Shell theme={null}
appsignal-cli --output json incidents list-exceptions --app "MyApp" --environment production --state OPEN
```

Om één incident als JSON te retourneren, filtert u op het nummer met `incidents show`:

```sh Shell theme={null}
appsignal-cli --output json incidents show --number 42 --app "MyApp" --environment production
```

## Volgende stappen

Incidenten vertellen u wat er faalt. Om de individuele samples achter een incident te zien, [haalt u de traces op](/cli/traces) op incidentnummer. Om de omringende logregels te bekijken, [tailt of doorzoekt u uw logs](/cli/logs) vanuit de terminal.
