This document describes the Cloud Monitoring Metrics Management page, which helps you get the most from your billable metrics. Your Google Cloud project has access to all the metrics visible to its metrics scope. You can use the Metrics Management page to do the following:
View metric usage at a glance: See how your metrics are being used in queries, custom dashboards, or alerting policies.
- Unused billable metrics are active metrics that have not been queried in the last 30 days and are not used in a custom dashboard or alerting policy.
- To view alerting policies or custom dashboards for a metric in your metrics scope but defined in a different project, use the project picker to select the Google Cloud project that stores the metric.
Identify high-cost, low-value metrics: Filter and sort metrics to see which unused billable metrics are contributing the most of your bill. See which projects and namespaces are responsible for expensive metrics.
- View trends over time to understand the relative costs of your billable metrics.
- Set up alerts to notify you if your overall usage patterns change.
- For information about how billable metrics are billed, see Pricing models for billable metrics.
Manage costs: Create rules to exclude unneeded metrics from being ingested into Cloud Monitoring. Excluded metrics are not billed. Exclusion rules apply regardless of the source of the metric.
- Exclude single metrics by using the metric name.
- Exclude groups of metrics by using a regular expression.
Make use of valuable metrics: Create alerting policies and dashboards for unused billable metrics.
Troubleshoot metric-ingestion problems
- Troubleshoot errors in writing metric data.
- Identify possible problems with the cardinality of billable metrics.
- View audit logs associated with the collection of billable metrics. For general information about audit logs, see the Cloud Audit Logs overview.
The Metrics Management page does not report user-defined
log-based metrics. These metrics, which are derived by
counting values in log entries, have the prefix logging.googleapis.com/user.
Before you begin
To view the charts and logs included on the Metrics Management page, to create alerting policies, and to create metric-exclusion rules, you must have the correct authorization.
The Metrics Management analyzes metrics in terms of data collection and usage. For more information about these categories, see Terminology.
Authorization
-
To get the permissions that you need to view dashboards and create alerting policies by using the Google Cloud console or to create, edit, and delete metric-exclusion rules, ask your administrator to grant you the Monitoring Editor (
roles/monitoring.editor) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.You might also be able to get the required permissions through custom roles or other predefined roles.
-
To get the permissions that you need to view audit logs, ask your administrator to grant you the Private Logs Viewer (
roles/logging.privateLogViewer) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.You might also be able to get the required permissions through custom roles or other predefined roles.
For more information about roles, see Control access with Identity and Access Management.
To view the audit logs generated by the metrics on the Metrics Management page, you must have enabled audit logging in your Google Cloud project. To enable your project to generate audit logs when data is read or written, do the following: