# Logs, metrics and alerts

> Every service writes its logs and metrics to your organisation. Read them in the console, follow them from the terminal, or let an agent ask for them.

## Read the logs

Logs are kept per service and per environment. Follow them live, or ask for a window of time. Times are always in UTC.

```sh
$ 00b5e2 logs api --prod --since 1h
2026-11-23 09:14:02 UTC  GET /bookings 200 12ms
2026-11-23 09:14:05 UTC  POST /bookings 201 31ms
$ 00b5e2 logs api --follow
```

_Also via MCP: get_logs_

## Filter and export

Filter by level or text. With the JSON flag you get one object per line, ready for an agent or a script.

```sh
$ 00b5e2 logs my-site --level error --grep timeout --json
{"time":"2026-11-23T09:20:11Z","level":"error","msg":"upstream timeout"}
```

## Metrics

Each service reports requests, errors, response time, CPU, memory and disk. The console draws them; the CLI returns the numbers.

| metric | what it measures |
| --- | --- |
| `requests` | requests per minute, by status code |
| `latency` | p50, p95 and p99 response time |
| `cpu, memory` | use against the organisation's cubes |
| `disk` | database and volume size |

```sh
$ 00b5e2 metrics api --since 24h --json
```

## Alerts

Set an alert on any metric. When it fires you get an email and a notification in the console, and it closes itself when the value is back to normal.

```sh
$ 00b5e2 alerts add api --metric errors --above 5% --for 5m
alert created: errors above 5% for 5m
```

> Logs and metrics stay inside your organisation. The admin panel shows usage totals, never the lines themselves.

Previous: [Sleep](https://docs.00b5e2.com/sleep.md)
Next: [Alerts](https://docs.00b5e2.com/alerts.md)
