Skip to content

Latest commit

 

History

History

stackdriver_metric_descriptor

Stackdriver Metric Descriptor

This template creates a Stackdriver Metric Descriptor.

Prerequisites

Deployment

Resources

Properties

See the properties section in the schema file(s):

Usage

  1. Clone the Deployment Manager samples repository

    git clone https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit
  2. Go to the dm directory

    cd dm
  3. Copy the example DM config to be used as a model for the deployment, in this case examples/stackdriver_metric_descriptor.yaml

    cp templates/stackdriver_metric_descriptor/examples/stackdriver_metric_descriptor.yaml my_metric_descriptor.yaml
  4. Change the values in the config file to match your specific GCP setup. Refer to the properties in the schema files described above.

    vim my_metric_descriptor.yaml  # <== Replace <FIXME:...> placeholders if any
  5. Set the project context to use the Stackdriver Workspace project

    gcloud config set project <STACKDRIVER_WORKSPACE_PROJECT_ID>
  6. Create your deployment as described below, replacing <YOUR_DEPLOYMENT_NAME> with your with your own deployment name

    gcloud deployment-manager deployments create <YOUR_DEPLOYMENT_NAME> \
        --config my_metric_descriptor.yaml
  7. In case you need to delete your deployment

    gcloud deployment-manager deployments delete <YOUR_DEPLOYMENT_NAME>

Examples