Method: projects.locations.systemMetrics.fetch

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

string

Required. The name of the location where we request metrics. Format: projects/{project}/locations/{location}

Request body

The request body contains data with the following structure:

JSON representation
{
  "resource": string,
  "promqlQuery": string,
  "startTime": string,
  "endTime": string
}
Fields
resource

string

Required. The resource name used for system metrics. It is the project ID in this case.

promqlQuery

string

Required. The promqlQuery to fetch the system metrics.

startTime

string

Optional. The startTime of the metrics in RFC3339 format.

endTime

string

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

string

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.