systemMetrics.fetch fetches the given system level metrics.
HTTP request
POST https://databaseinsights.googleapis.com/v1beta/{parent=projects/*/locations/*}/systemMetrics:fetch
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The name of the location where we request metrics. Format: |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "resource": string, "promqlQuery": string, "startTime": string, "endTime": string } |
| Fields | |
|---|---|
resource |
Required. The resource name used for system metrics. It is the project ID in this case. |
promqlQuery |
Required. The promqlQuery to fetch the system metrics. |
startTime |
Optional. The startTime of the metrics in RFC3339 format. |
endTime |
Optional. The endTime of the metrics in RFC3339 format. |
Response body
The response of the systemMetrics.fetch RPC.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "promqlResult": string } |
| Fields | |
|---|---|
promqlResult |
The result of the fetch system metrics. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent resource:
databaseinsights.systemMetrics.fetch
For more information, see the IAM documentation.