Synaesthetik
Synaesthetik

Reputation: 33

Why aren't all GCP metrics available for alerts or dashboard elements in Stackdriver?

I cannot seem to figure out how to get certain metrics from GCP into Stackdriver (google monitoring) in a usable way. They can be viewed using Stackdriver's "Metrics Explorer" tool, but not saved into a graph or alerting policy. As a specific example, only a handful of the metrics outlined in this table are available:

https://cloud.google.com/monitoring/api/metrics_gcp#gcp-container

Again, I can use the "Metrics Explorer" tool to immediately visualize any one of them in an ad-hoc graph, but I cannot create an alerting policy or any sort of persistent monitoring for anything except for CPU Usage, Disk Usage, Page Faults, and Used Memory. Does anyone know how to get one of these metrics (such as container/cpu/usage_time) into an alerting policy?

Upvotes: 1

Views: 2677

Answers (2)

JMD
JMD

Reputation: 598

You can create a dashboard and add those metrics that you want to view. To do so please follow the instructions below. Further information on dashboards and on creating charts and alerts can be found in this documentation link.

  1. At the Google Cloud Platform click on Products & Services which is the icon with the four bars at the top left hand corner.
  2. On the menu go to the Stackdriver section and click on Monitoring. A new ‘Stackdriver Monitoring’ window for your project will open up.
  3. At the left-side navigation list click on Dashboards and select Create Dashboard. During this step you also have the option to add a chart to an existing dashboard by clicking on its name.

  4. Give a name to the dashboard you’re creating.

  5. At the right-hand side you can see different options to customize. Click on ‘Add Chart’ and fill in the requested information:
    Give a name to the chart you’re creating.
    Resource Type: Choose your resource type, e.g ‘GCE VM Instance’.
    Metric: Choose the metrics that you want to add, e.g ‘compute.googleapis.com/instance/uptime ‘. Metric information for each product can be found in this documentation link.

  6. Fill in all other information as needed: Filter, ‘Group By’, etc.

You can add more metrics by clicking the ‘Add Metric’ button.

Once you have finished click on the ‘Save’ button to save and create this new chart.

At the left-hand menu list click Dashboard and select the dashboard you have created to view it.

Upvotes: -1

Amir Hermelin
Amir Hermelin

Reputation: 216

Metrics Explorer includes access to more metrics than are currently available for alerting. We're working on addressing this both for UIs and APIs. Please stay tuned to release notes. Thanks for using Stackdriver!

Upvotes: 2

Related Questions