get_cluster_metrics
Retrieve one or more Couchbase cluster statistics over a historic time window in a single call to check whether a metric is spiking, climbing, or stable and quantify suspected problems.
Instructions
Get one or more cluster statistics over a historic time window in a single call.
Use this to quantify a suspected problem (e.g. after get_cluster_health_and_services or get_client_connectivity_report) — is a metric spiking, climbing, or stable over time?
Self-managed Couchbase Server 7.6+ only — rejects Capella connections without a REST call. Calls POST /pools/default/stats/range.
metrics is passed through as the request body: a list of specs, each with a required
"metric" (list of {"label", "value"} pairs, e.g. [{"label": "name", "value":
"kv_ep_diskqueue_fill"}]), an optional "nodes" ("host:port" targets; omit it to cover every
node, which is usually what you want), and optional "applyFunctions",
"nodesAggregation", "start"/"end" (negative seconds relative to now; default -60/now),
"step" (seconds, default 10), "alignTimestamps".
To find metric names, call discover_tool_input_values(tool_name="get_cluster_metrics") — it lists or searches the full Couchbase metrics reference bundled with this server, offline. Don't guess a metric name: an unknown name comes back as a per-spec error with no data.
Not bounded: any number of specs, window, step, or node count is passed straight through to the REST call, so a broad request (long window, fine step, many nodes/specs) can return a large response.
Returns {"status": "success", "data": [...]} (one entry per spec, each with "data" and any per-spec "errors") or {"status": "error", "error": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metrics | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||