---
title: "Get metrics"
method: GET
path: "/api/v1/databases/{database_id}/metrics"
tags: ["Managed Databases"]
---

# Get metrics

`GET /api/v1/databases/{database_id}/metrics`

Latest usage snapshot: CPU, memory, storage, connections, and replication lag. Metrics refresh about every 60 seconds; zero values mean not measured yet.

## Path parameters

- `database_id` string, required

## Response `200`

Latest metrics snapshot

- object — Latest usage snapshot, refreshed about every 60 seconds. Zero values mean not measured yet.
  - `success` boolean
  - `cpu_used_millicores` integer — CPU in use, millicores
  - `cpu_capacity_millicores` integer — CPU capacity, millicores
  - `mem_used_bytes` integer — Memory in use, bytes
  - `mem_capacity_bytes` integer — Memory capacity, bytes
  - `storage_used_bytes` integer — Storage in use, bytes
  - `storage_capacity_bytes` integer — Storage capacity, bytes
  - `connections_active` integer — Active client connections
  - `connections_max` integer — Connection limit
  - `replication_lag_bytes` integer — Standby/replica lag in bytes (0 without HA or replicas)
  - `archive_lag_bytes` integer — WAL archiving lag in bytes (PostgreSQL)
  - `metrics_updated_at` string, date-time — When this snapshot was taken

## Other responses

- `401` — Authentication required
- `404` — Resource not found

---

[API](https://skmtc.dev/rafftechnologies/apis/raff-api.md) · [All operations](https://skmtc.dev/rafftechnologies/apis/raff-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rafftechnologies/raff-api/revisions/2f4df56be77c/schema)
