Overview

This page describes how Cloud Monitoring presents its services to you and how you can configure Cloud Monitoring for your Google Cloud project. This page is intended for developers and system administrators.

Before you begin

If you created your Cloud project, then you have sufficient permissions to use Cloud Monitoring. If you've been granted access to a project, ensure that your role has sufficient permissions to use Cloud Monitoring. For information about the required roles, see Authorization.

Understanding metrics scopes

Cloud Monitoring lets you view and manage the metrics for projects in the following ways:

  • For a single project
  • For multiple projects
  • For multiple Google Cloud projects and AWS accounts

You determine which metrics you want to view by configuring a metrics scope. The metrics scope lists all of the projects and accounts it monitors, and it is hosted by a scoping project. The scoping project is the Cloud project that is selected in the Cloud Console project picker, and it stores the alerts, uptime checks, dashboards, and monitoring groups that you configure for the metrics scope.

With this data model you can view a project's metrics in isolation as well as in combination with metrics stored by other projects. For example, assume that you have two projects, Project-A and Project-B, that contain Compute Engine virtual machine (VM) instances. Assume that you have another project, Project-Multiview, that you've configured so that it can view the metrics for Project-A and Project-B. Now, there are two different ways you can view the metrics of Project-A:

  • If you select Project-Multiview with the Cloud Console project picker and then go to the Monitoring page, you view the metrics scope for Project-Multiview and you can see the metrics for all three projects:

    Figure illustrating the multi-view metrics scope.

  • If you select Project-A with the Cloud Console project picker and then go to the Monitoring page, you view the metrics scope for Project-A and you can only see the metrics for that project:

    Figure illustrating the metrics scope of `Project-A`.

For information on configuring a metrics scope to include metrics for multiple projects, see Viewing metrics for multiple projects.

Determining the visibility of metrics

To determine the visibility of metrics for your project, do the following:

  1. Select your project using the Cloud Console project picker.
  2. In the navigation pane, click Monitoring.
  3. Ensure that the Monitoring navigation pane is expanded. If it isn't, click Last page.
  4. Click Expand on the Metrics scope field.

    For both data models, the displayed data is similar. The following screenshot illustrates the page displayed for the metrics scope model when Project-Multiview is selected in the Cloud Console project picker:

    Sample of the page that lists the monitored projects.

    The table labeled Metrics monitored by this project lists the projects whose metrics can be viewed with the current metrics scope. Each row in the table lists a project and that project's role:

    • Scoping project indicates that the project stores the uptime checks, alerting policies, groups, and dashboards that you configure. A metrics scope contains a single scoping project. A project can be a scoping project for a single metrics scope. For this example, Project-Multiview is the scoping project.

    • Monitored project indicates that the metrics for the Google Cloud project or AWS account are visible to the current metrics scope. For this example, Project-A and Project-B are monitored projects.

    To identify any other projects that can access the metrics of this project, look for the projects listed under the header The projects listed below can view this project's metrics. In the previous screenshot, no other projects can access the metrics stored by Project-Multiview.

Modifying your project's Cloud Monitoring configuration

You can modify your project's Cloud Monitoring configuration so that you can view and monitor metrics for multiple Google Cloud projects or AWS accounts. The projects or accounts that you add to the current metrics scope are called monitored projects.

Adding a monitored project

To add a monitored project, do the following:

  1. In the Monitoring navigation pane, select Settings.
  2. To add a Google Cloud project, click Add GCP Projects and complete the dialog. Before you add a monitored project, we recommend that you read Viewing metrics for multiple projects.

  3. To add an AWS account as a monitored project, do one of the following:

    • Click Create AWS connector project to connect an AWS account to Google Cloud—this step creates an AWS connector project—and then adds the AWS connector project as a monitored project to your current metrics scope. If you don't have an AWS connector project for your AWS account, select this option.
    • Click Add AWS connector project to add an existing AWS connector project as a monitored project to your current metrics scope.

    Before you add an AWS account as a monitored project, we recommend that you read Viewing metrics for an AWS account.

Removing a monitored project

To remove a monitored project, do the following:

  1. In the Monitoring navigation pane, select Settings.
  2. To remove one or more Google Cloud projects, in the GCP Projects in scope pane, select the projects that you want to remove and click Remove project.
  3. To remove one or more AWS accounts, in the AWS Accounts in scope pane, select the AWS connector projects that you want to remove and click Remove project.

  4. Delete any AWS connector projects that you removed and that are no longer monitored projects.

Changing the current metrics scope

The project selected in the Cloud Console project picker is the scoping project of the current metrics scope. A project can be the scoping project for one metrics scope.

To select a different metrics scope, do one of the following:

  • Select a different project in the Cloud Console project picker. The Cloud Console project picker lists all projects that you can access.

  • In the navigation pane, click Expand in the metrics scope field, and then select a project from one of the tables. One table on this page lists the projects whose metrics are visible to the current project. The other table lists the projects that can view the current project's metrics.

Disabling Monitoring

To disable the collection of Monitoring data in a Google Cloud project or in an AWS connector project, do the following:

  1. From the Cloud Console, select the Cloud project or the AWS connector project, and then go to the APIs & Services page:

    Go to APIs & Services

  2. Select Cloud Monitoring API.

  3. Click Disable API

Viewing your bill

To view your bill for a project, do the following:

  1. In the Monitoring navigation pane, select Settings.
  2. In the Settings page, select Overview.
  3. Locate the project, click More options and then select View bill.

For each project, the column Month to date displays the byte count of billable metrics for the current calendar month. Similarly, the Previous month column lists the total ingested byte count for the previous calendar month. Lastly, the Monthly projection column provides an estimate of the total byte count of billable metrics for the current calendar month:

Authorization

This section describes the roles or permissions needed to view, create, or modify a metrics scope. For detailed information about Identity and Access Management(IAM) for Monitoring, see Access control.

To view the metrics scope for a Cloud project, you must have one of the following IAM roles for the project:

  • Monitoring Viewer
  • Monitoring Editor
  • Monitoring Admin
  • Project Owner

To create a metrics scope for a Cloud project, you must have one of the following IAM roles for the project:

  • Monitoring Editor
  • Monitoring Admin
  • Project Owner

To modify a metrics scope, you must have one of the following IAM roles for the scoping project of the metrics scope and for the project to be added (or removed) as a monitored project:

  • Monitoring Editor
  • Monitoring Admin
  • Project Owner

To view a list of roles and their associated permissions, see Roles.

What's next