# Metrics

Send numeric time series such as CPU, memory, disk and network usage to a
source, then chart them in the source's **Metrics** tab. Metrics use the
same source token as logs.

## Endpoint

```
POST https://ingest.tailcove.dev/api/v1/metrics
Authorization: Bearer <source token>
Content-Type: application/json
```

The body is one JSON object, an array of them or NDJSON, up to 1,000
objects, 5,000 points and 5 MB per request.

## Payload shapes

**Native**

```json
[
    {
        "name": "cpu.usage",
        "value": 41.5,
        "host": "web-1",
        "labels": { "core": "0" }
    },
    {
        "name": "mem.used_bytes",
        "value": 1073741824,
        "host": "web-1",
        "ts": "2026-10-21T10:00:00Z"
    }
]
```

`ts` defaults to now. `host` defaults to the `host` or `hostname` label.
`labels` is an object or a `"k=v,k=v"` string.

**Telegraf** (`outputs.http` with `data_format = "json"`): one point per
field, named `measurement.field`. Telegraf's `{"metrics": [...]}` batch is
accepted as sent.

**Vector** metric events: gauges and counters, named `namespace.name`.
Counters are stored as the running total they were sent as, not as a rate.

See [Vector](https://tailcove.dev/docs/metrics/vector), [Telegraf](https://tailcove.dev/docs/metrics/telegraf) and
[Prometheus remote-write](https://tailcove.dev/docs/metrics/prometheus).

## Rules

- Names match `A-Za-z0-9_.:-`, up to 128 characters.
- Values must be finite numbers; anything else is skipped and counted.
- Labels: at most 8 pairs, keys up to 32 characters, values up to 64.
  `,` and `=` in a value become `_`.
- A timestamp before 2000 or more than 24 hours ahead is replaced by now.
- A series is name + host + labels. Keep label values low-cardinality
  (a core number, a mount point), never a request or user id.

## Limits

| Plan     | Points per minute | Distinct series |
| -------- | ----------------- | --------------- |
| Free     | 1,500             | 100             |
| Pro      | 15,000            | 1,000           |
| Business | 60,000            | 5,000           |

Metrics are kept for the source's retention, at most 90 days.

Metric points count toward your plan's included GB, like log lines and spans (see
[Billing & Quotas](https://tailcove.dev/docs/billing-quotas)). Points are refused with `429` and
`"error": "quota_exceeded"` once the team reaches its monthly ceiling (the Free plan's included
GB, or a paid plan's included GB plus its overage).

## Responses

| Status | Meaning                                                      |
| ------ | ------------------------------------------------------------ |
| `202`  | `{"accepted": n, "skipped": n, "over_series_limit": n}`      |
| `401`  | Missing or invalid token                                     |
| `413`  | Body too large                                               |
| `422`  | Body is not valid JSON or has too many points                |
| `429`  | Over the points-per-minute limit; wait `Retry-After` seconds |
| `503`  | Buffer full; retry later                                     |

## Charts

The Metrics tab charts one metric at a time with a range, a host filter
and an aggregate: `avg`, `min`, `max`, `sum` or `last`.
