---
title: pydo.monitoring.get_database_mysql_cpu_usage()
description: Get Database MySQL CPU Usage Metrics
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/monitoring/get_database_mysql_cpu_usage/
last_updated: "2026-11-06"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.monitoring.get_database_mysql_cpu_usage()

Generated on 6 Nov 2026 from `pydo` version [`v0.45.0`](https://github.com/digitalocean/pydo/releases/tag/v0.45.0)

## Usage

```python
client.monitoring.get_database_mysql_cpu_usage(
    db_id="9cc10173-e9ea-4176-9dbc-a4cee4c4ff30",
    aggregate="avg",
    start="1620683817",
    end="1620705417",
)
```

Returns `JSON` Raises `HttpResponseError`

## Description

Retrieve CPU usage (percent) for a MySQL cluster. Response is a time series of cluster-level CPU usage. Use **aggregate** to get avg, max, or min over the range.

## Parameters

`db_id` string required

The DBaaS cluster UUID (database ID).

`aggregate` string required

Aggregation over the time range (avg, max, or min).

One of: `avg`, `max`, `min`

`start` string required

UNIX timestamp to start metric window.

`end` string required

UNIX timestamp to end metric window.

## Response Example

## Show Response Example

```json
{
  "data": {
    "result": [],
    "resultType": "matrix"
  },
  "status": "success"
}
```

## More Information

See [`/v2/monitoring/metrics/database/mysql/cpu_usage`](https://docs.digitalocean.com/reference/api/reference/monitoring/index.html.md#monitoring_get_database_mysql_cpu_usage) in the API reference for additional detail on responses, headers, parameters, and more.