# Chart custom metrics

List your custom series and read their datapoints, in the console's chart or over the API.

Replace _series-id_ with the `id` the series list returns.

## Prerequisites

- Permission for `monitoring:ListMetrics` to list the series and `monitoring:GetMetricData` to
  read their datapoints, both on `rn:ews::<organization id>:monitoring:*`.
- In the console, without `monitoring:ListMetrics` **Custom metrics** shows an access-denied
  notice; without `monitoring:GetMetricData` it lists the series but says "Reading datapoints needs
  monitoring:GetMetricData."

## Read a series

**Console**
1. Open **Monitoring**, then **Custom metrics**.
2. Choose the namespace.
3. In the table, choose the series' metric name; the chart shows it.
4. Choose a statistic: **Average**, **Sum**, **Minimum**, **Maximum** or **Sample count**.
5. Choose a range from **1 hour** to **14 days**.

**CLI**
```sh
dcloud monitoring custom-metrics list --namespace Shop
dcloud monitoring custom-metrics get-data --series-id series-id \
  --start 2026-11-10T00:00:00Z --period 300 --statistic sum
```

**API**
```http
GET /monitoring/api/custom-metrics?namespace=Shop
```

```http
GET /monitoring/api/custom-metrics/data?seriesId=series-id&start=2026-11-10T00:00:00Z&period=300&statistic=sum
```

## Result

The list gives each series' `id`, namespace, name, dimensions, unit and its last datapoint, up to
200 unless you set `limit` (at most 1000). The data answer has one `{ ts, value }` per period with
data, and the `period` it actually used.

## Retention and resolution

Minute points are kept 15 days and hourly points 15 months. A read that starts more than 15 days
ago, or asks for a period of whole hours, is answered from the hourly points, and its period is
rounded up to whole hours. A range may hold at most 1440 periods.

A series is removed with its points once it has had no datapoint for 15 months; you cannot delete
it earlier.

## Related

- [Publish custom metrics](publish-custom-metrics.md)
- [Alarm on a custom metric](alarm-on-a-custom-metric.md)
- `monitoring.custom-metrics.get-data` · `dcloud monitoring custom-metrics get-data`
