# Metrics

Source: https://openpanel.sh/docs/monitoring/metrics

CPU, memory, network and restarts of each replica of a service, over the last hour up to the last 30 days, through the API, the CLI and MCP.

Every service has metrics for each of its replicas: how much CPU and memory it uses, how much it sends and receives, and how often its container restarted. The agent on each of your servers takes a sample of every container every 15 seconds and sends it to OpenPanel, which keeps 30 days of them.

## What is measured [#what-is-measured]

| Metric | Unit | What it is |
|---|---|---|
| `cpu` | percent of one CPU core | How busy the container keeps the processor. A container using two full cores shows 200. |
| `memory` | bytes | The memory the container uses now. |
| `networkRx` | bytes per second | What the container receives. |
| `networkTx` | bytes per second | What the container sends. |
| `restarts` | count | Each container's restart counter, and `total`: how many restarts happened within the range, all replicas together. |

Each metric has one line per replica, with the container, the server it runs on and the deployment it belongs to. A new deployment starts new containers, so its lines start fresh.

## Ranges [#ranges]

| Range | One point every |
|---|---|
| `1h` (the default) | minute |
| `6h` | 5 minutes |
| `24h` | 15 minutes |
| `7d` | hour |
| `30d` | 4 hours |

## Read them [#read-them]

<Tabs items={["CLI","API","MCP"]}>
<Tab value="CLI">
```sh
openpanel metrics web --project shop --range 24h
```

```text
web, 2026-12-01 10:00 to 2026-12-02 10:00 UTC, 2 replica lines
METRIC       NOW        AVERAGE    PEAK
CPU          14.2%      9.8%       61.0%
Memory       182.4 MB   176.9 MB   201.3 MB
Network in   12.4 KB/s  8.1 KB/s   96.2 KB/s
Network out  40.7 KB/s  22.3 KB/s  310.5 KB/s
Restarts in the range: 0
```

The table adds the replicas together. `--json` prints every replica's points as the API answers them.
</Tab>

<Tab value="API">
```sh
curl "https://openpanel.sh/api/v1/services/$SERVICE_ID/metrics?range=24h" \
  -H "Authorization: Bearer $OPENPANEL_TOKEN"
```

The answer has `start`, `end` and `step` (seconds between points), and for each metric its `unit` and `series`: one per replica, with `replica`, `container`, `serverId`, `deploymentId` and `points`, each point `[unix seconds, value]`, oldest first. See [Read a service's metrics](/docs/api/services/read-a-service-s-metrics) in the API reference.
</Tab>

<Tab value="MCP">
Ask your AI agent, for example: "How much memory did the web service in shop use over the last day?" It calls the tool `services_metrics`.
</Tab>
</Tabs>

## Who can read them [#who-can-read-them]

Anyone who can see the service's project, the same as its settings and logs. See [Roles](/docs/members/roles).

## In the console [#in-the-console]

The service's **Metrics** tab on the canvas is being connected to these metrics. Until it is, a server's own page shows its live reading of CPU, memory and disk.

## What can go wrong [#what-can-go-wrong]

| Message | What it means |
|---|---|
| "Metrics are not set up on this OpenPanel yet." | The OpenPanel you use cannot reach its metrics store. |
| "Metrics cannot be read right now: …" | OpenPanel's gateway did not answer; try again in a minute. |
| No lines at all | The service has not run in the range: its first sample comes 15 seconds after a replica starts. |

<Cards>
<Card href="/docs/monitoring/logs" title="Logs" description="What a service's containers print, read live from your servers." />

<Card href="/docs/servers/status" title="A server's status" description="Its live state, security settings and system log." />
</Cards>