database_mysql_cpu_usage
Creates, updates, deletes, gets or lists a database_mysql_cpu_usage resource.
Overview
| Name | database_mysql_cpu_usage |
| Type | Resource |
| Id | digitalocean.monitoring.database_mysql_cpu_usage |
Fields
The following fields are returned by SELECT queries:
- monitoring_get_database_mysql_cpu_usage
The response will be a JSON object with a key called data and status.
| Name | Datatype | Description |
|---|---|---|
data | object | |
status | string | (success, error) (example: success) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
monitoring_get_database_mysql_cpu_usage | select | db_id, aggregate, start, end | 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
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
aggregate | string | Aggregation over the time range (avg, max, or min). (example: avg) |
db_id | string (uuid) | The DBaaS cluster UUID (database ID). (example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30) |
end | string | UNIX timestamp to end metric window. (example: 1620705417) |
start | string | UNIX timestamp to start metric window. (example: 1620683817) |
SELECT examples
- monitoring_get_database_mysql_cpu_usage
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.
SELECT
data,
status
FROM digitalocean.monitoring.database_mysql_cpu_usage
WHERE db_id = '{{ db_id }}' -- required
AND aggregate = '{{ aggregate }}' -- required
AND start = '{{ start }}' -- required
AND end = '{{ end }}' -- required
;