Reputation: 33
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
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.
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.
Give a name to the dashboard you’re creating.
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.
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
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