# Metrics

Every service in an [app](/docs/apps/apps-and-services) reports four metrics: CPU, memory, request rate, and request latency. Koo reads them on demand from its hosting layer — as charts in the console, and as raw time series through the [observability API](/api/observability).

## What's measured

CPU and memory are reported for every service type, including [Postgres](/docs/data/postgres) and [Redis](/docs/data/redis). Request rate and latency cover web services that handle traffic.

A service's CPU and memory settings cap what it has available. Sustained high CPU or memory is the usual signal to give the service more.

## Reading the charts

1. 
2. 
3.

Charts are per service. A chart can carry more than one series — each series is labeled, so you can tell them apart.

## Replicas

A web service can run more than one replica, and each plan sets a per-service replica ceiling — see the plan comparison in [Billing](/docs/account/billing). Postgres and Redis services run as a single replica.

Scaling settings live on the [service spec](/api/objects/service): a minimum and maximum replica count, plus the metric scaling tracks — concurrency, CPU, or requests per second. The _current_ replica counts — how many are ready versus desired — are part of [status](/docs/observability/status), not metrics.

## Retention by plan

How far back you can query depends on your plan; the Free plan's window is part of the [free tier](/docs/get-started/free-tier), and paid plans extend it — exact windows are in the plan comparison in Billing. Requesting a range beyond your retention isn't an error: the window is clamped server-side to what your plan keeps.

> **Note:**
>
> Koo doesn't warehouse your metrics. Every query — chart or API — is read live from Koo's hosting layer, so what you see is the source of truth, bounded by your plan's window.

## Metrics vs status

Metrics show trends; status shows current truth. After a deploy, confirm the service is running from its status — readiness and replica counts — not from a dip or spike in the charts. Use metrics to answer "how has this behaved over time?" and [status](/docs/observability/status) to answer "is this healthy right now?"

For the request-by-request view, see [Logs](/docs/observability/logs).

## Fetch metrics from the API

Each request returns one metric as a JSON time series — labeled series of timestamped points, with the unit, resolved range, and step size:

```text
curl "https://api.koo.io/accounts/{accountId}/projects/{projectId}/environments/{environmentId}/services/{name}/metrics?metric=cpu&range=1h" \
  -H "Authorization: Bearer kc_…"
```

`metric` is one of `cpu`, `mem`, `req`, or `latency`; `range` is a relative window like `1h`, clamped to your plan's retention. These calls authenticate with an [API token](/docs/developers/api-tokens). The full request and response shapes are in the [observability API reference](/api/observability).
