Method: projects.metricDescriptors.create

Creates a new metric descriptor. User-created metric descriptors define custom metrics.

HTTP request

POST https://monitoring.googleapis.com/v3/{name}/metricDescriptors

Path parameters

Parameters
name

string

The project on which to execute the request. The format is "projects/{project_id_or_number}".

Request body

The request body contains an instance of MetricDescriptor.

Response body

If successful, the response body contains a newly created instance of MetricDescriptor.

Authorization

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/monitoring
  • https://www.googleapis.com/auth/monitoring.write

For more information, see the Auth Guide.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Stackdriver Monitoring