diff --git a/specification/DigitalOcean-public.v2.yaml b/specification/DigitalOcean-public.v2.yaml index 8186078a4..94c931203 100644 --- a/specification/DigitalOcean-public.v2.yaml +++ b/specification/DigitalOcean-public.v2.yaml @@ -1657,6 +1657,50 @@ paths: get: $ref: "resources/monitoring/monitoring_get_droplet_autoscale_target_memory_utilization.yml" + /v2/monitoring/metrics/database/mysql/cpu_usage: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_cpu_usage.yml" + + /v2/monitoring/metrics/database/mysql/load: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_load.yml" + + /v2/monitoring/metrics/database/mysql/memory_usage: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_memory_usage.yml" + + /v2/monitoring/metrics/database/mysql/disk_usage: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_disk_usage.yml" + + /v2/monitoring/metrics/database/mysql/threads_connected: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_threads_connected.yml" + + /v2/monitoring/metrics/database/mysql/threads_created_rate: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_threads_created_rate.yml" + + /v2/monitoring/metrics/database/mysql/threads_active: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_threads_active.yml" + + /v2/monitoring/metrics/database/mysql/index_vs_sequential_reads: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_index_vs_sequential_reads.yml" + + /v2/monitoring/metrics/database/mysql/op_rates: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_op_rates.yml" + + /v2/monitoring/metrics/database/mysql/schema_throughput: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_schema_throughput.yml" + + /v2/monitoring/metrics/database/mysql/schema_latency: + get: + $ref: "resources/monitoring/monitoring_get_database_mysql_schema_latency.yml" + /v2/monitoring/sinks/destinations: post: $ref: "resources/monitoring/monitoring_create_destination.yml" diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_cpu_usage.yml b/specification/resources/monitoring/monitoring_get_database_mysql_cpu_usage.yml new file mode 100644 index 000000000..ff8faa330 --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_cpu_usage.yml @@ -0,0 +1,34 @@ +operationId: monitoring_get_database_mysql_cpu_usage + +summary: Get Database MySQL CPU Usage Metrics + +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. + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/aggregate_avg_max_min' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_disk_usage.yml b/specification/resources/monitoring/monitoring_get_database_mysql_disk_usage.yml new file mode 100644 index 000000000..0b8aa0da9 --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_disk_usage.yml @@ -0,0 +1,34 @@ +operationId: monitoring_get_database_mysql_disk_usage + +summary: Get Database MySQL Disk Usage Metrics + +description: >- + Retrieve disk usage (percent) for a MySQL cluster. Use **aggregate** (avg, max, + or min) over the time range. + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/aggregate_avg_max_min' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_index_vs_sequential_reads.yml b/specification/resources/monitoring/monitoring_get_database_mysql_index_vs_sequential_reads.yml new file mode 100644 index 000000000..10a805023 --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_index_vs_sequential_reads.yml @@ -0,0 +1,33 @@ +operationId: monitoring_get_database_mysql_index_vs_sequential_reads + +summary: Get Database MySQL Index vs Sequential Reads Metrics + +description: >- + Retrieve index vs sequential reads ratio (percent) for a MySQL service — i.e. + percentage of reads using an index. + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_load.yml b/specification/resources/monitoring/monitoring_get_database_mysql_load.yml new file mode 100644 index 000000000..2de4dc17e --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_load.yml @@ -0,0 +1,36 @@ +operationId: monitoring_get_database_mysql_load + +summary: Get Database MySQL Load Average Metrics + +description: >- + Retrieve load metrics for a MySQL cluster. Use **metric** for the window: **load1** (1-minute), + **load5** (5-minute), or **load15** (15-minute). Use **aggregate** to get either the average (avg) + or maximum (max) over that window over the time range. + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/metric_load' + - $ref: 'parameters.yml#/aggregate_avg_max' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_memory_usage.yml b/specification/resources/monitoring/monitoring_get_database_mysql_memory_usage.yml new file mode 100644 index 000000000..9691e37cd --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_memory_usage.yml @@ -0,0 +1,34 @@ +operationId: monitoring_get_database_mysql_memory_usage + +summary: Get Database MySQL Memory Usage Metrics + +description: >- + Retrieve memory usage (percent) for a MySQL cluster. Use **aggregate** (avg, max, + or min) over the time range. + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/aggregate_avg_max_min' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_op_rates.yml b/specification/resources/monitoring/monitoring_get_database_mysql_op_rates.yml new file mode 100644 index 000000000..801508137 --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_op_rates.yml @@ -0,0 +1,34 @@ +operationId: monitoring_get_database_mysql_op_rates + +summary: Get Database MySQL Operations Throughput Metrics + +description: >- + Retrieve operations rate (per second) for a MySQL service. Use **metric** to + choose select, insert, update, or delete. + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/metric_op_rates' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_schema_latency.yml b/specification/resources/monitoring/monitoring_get_database_mysql_schema_latency.yml new file mode 100644 index 000000000..ac0a24a5c --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_schema_latency.yml @@ -0,0 +1,35 @@ +operationId: monitoring_get_database_mysql_schema_latency + +summary: Get Database MySQL Schema Latency Metrics + +description: >- + Retrieve table I/O latency (seconds) for a schema. Requires **schema** and + **metric** (insert, fetch, update, delete). + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/schema' + - $ref: 'parameters.yml#/metric_schema_io' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_schema_throughput.yml b/specification/resources/monitoring/monitoring_get_database_mysql_schema_throughput.yml new file mode 100644 index 000000000..206cc2672 --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_schema_throughput.yml @@ -0,0 +1,35 @@ +operationId: monitoring_get_database_mysql_schema_throughput + +summary: Get Database MySQL Schema Throughput Metrics + +description: >- + Retrieve table I/O throughput (rows per second) for a schema. Requires **schema** + and **metric** (insert, fetch, update, delete). + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/schema' + - $ref: 'parameters.yml#/metric_schema_io' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_threads_active.yml b/specification/resources/monitoring/monitoring_get_database_mysql_threads_active.yml new file mode 100644 index 000000000..f9534212b --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_threads_active.yml @@ -0,0 +1,31 @@ +operationId: monitoring_get_database_mysql_threads_active + +summary: Get Database MySQL Threads Active Metrics + +description: Retrieve active (running) threads for a MySQL service. + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_threads_connected.yml b/specification/resources/monitoring/monitoring_get_database_mysql_threads_connected.yml new file mode 100644 index 000000000..3c2366aca --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_threads_connected.yml @@ -0,0 +1,31 @@ +operationId: monitoring_get_database_mysql_threads_connected + +summary: Get Database MySQL Threads Connected Metrics + +description: Retrieve current threads connected for a MySQL service (gauge). + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/monitoring_get_database_mysql_threads_created_rate.yml b/specification/resources/monitoring/monitoring_get_database_mysql_threads_created_rate.yml new file mode 100644 index 000000000..8b2ca433e --- /dev/null +++ b/specification/resources/monitoring/monitoring_get_database_mysql_threads_created_rate.yml @@ -0,0 +1,31 @@ +operationId: monitoring_get_database_mysql_threads_created_rate + +summary: Get Database MySQL Threads Created Rate Metrics + +description: Retrieve threads created rate for a MySQL service (per second). + +tags: + - Monitoring + +parameters: + - $ref: 'parameters.yml#/db_id' + - $ref: 'parameters.yml#/metric_timestamp_start' + - $ref: 'parameters.yml#/metric_timestamp_end' + +responses: + "200": + $ref: responses/metric_response.yml + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml + +security: + - bearer_auth: + - 'monitoring:read' diff --git a/specification/resources/monitoring/parameters.yml b/specification/resources/monitoring/parameters.yml index 72f7561eb..750eca70f 100644 --- a/specification/resources/monitoring/parameters.yml +++ b/specification/resources/monitoring/parameters.yml @@ -119,3 +119,92 @@ sink_uuid: schema: type: string example: 78b172b6-52c3-4a4b-96d5-78d3f1a0b18c + +# DBaaS MySQL monitoring metrics parameters + +db_id: + in: query + name: db_id + required: true + description: The DBaaS cluster UUID (database ID). + schema: + type: string + format: uuid + example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 + +aggregate_avg_max_min: + in: query + name: aggregate + required: true + description: Aggregation over the time range (avg, max, or min). + schema: + type: string + enum: + - avg + - max + - min + example: avg + +aggregate_avg_max: + in: query + name: aggregate + required: true + description: Aggregation over the time range (avg or max). + schema: + type: string + enum: + - avg + - max + example: avg + +metric_load: + in: query + name: metric + required: true + description: >- + Load window: **load1** (1-minute), **load5** (5-minute), **load15** (15-minute). The value is + either average or max over that window, depending on the **aggregate** parameter (avg or max). + schema: + type: string + enum: + - load1 + - load5 + - load15 + example: load1 + +metric_op_rates: + in: query + name: metric + required: true + description: Operation type (select, insert, update, or delete). + schema: + type: string + enum: + - select + - insert + - update + - delete + example: select + +metric_schema_io: + in: query + name: metric + required: true + description: Table I/O operation (insert, fetch, update, or delete). + schema: + type: string + enum: + - insert + - fetch + - update + - delete + example: insert + +schema: + in: query + name: schema + required: true + description: The schema (database) name. + schema: + type: string + example: defaultdb \ No newline at end of file