The metrics scope of a Google Cloud project determines which projects'
time-series data that project can chart and monitor with alerting policies. You
can use the Google Cloud console to add or remove monitored projects in a
metrics scope when you need to manage telemetry for services and resources
across multiple projects.

For information about configuring a metrics scope programmatically, see
[Configure a metrics scope by using the API](https://docs.cloud.google.com/monitoring/settings/manage-api.md.txt).

## App Hub applications and metrics scopes

You manage the metrics scope for [App Hub](https://docs.cloud.google.com/app-hub/docs/overview.md.txt)
host projects. You can manage the metrics scope by using either the
[Google Cloud console](https://docs.cloud.google.com/monitoring/settings/multiple-projects.md.txt) or the
[Cloud Monitoring API](https://docs.cloud.google.com/monitoring/settings/manage-api.md.txt).

Google Cloud manages the metrics scope for management projects, unless
adding a project to the metrics scope fails due to exhaustion of the
metrics scope quota. In that case, you can request a quota increase and
then manually add projects to the metrics scope of the
management project. To learn more, see
[Metrics scopes for management projects](https://docs.cloud.google.com/monitoring/settings/metrics-scope-for-management-projects.md.txt).

## Before you begin

- If you aren't familiar with the terms *metrics scope* and *scoping project* , then see [Metrics scopes overview](https://docs.cloud.google.com/monitoring/settings.md.txt).

<!-- -->

-

  To get the permissions that
  you need to configure a metrics scope,

  ask your administrator to grant you the
  [Monitoring Metrics Scopes Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/monitoring.md.txt#monitoring.metricsScopesAdmin) (`roles/monitoring.metricsScopesAdmin`) IAM role on the scoping project and on each project
  that you want to add to, or remove from, the metrics scope.


  For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


  You might also be able to get
  the required permissions through [custom
  roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined
  roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).
- If you use [VPC Service Controls](https://docs.cloud.google.com/vpc-service-controls/docs/overview.md.txt), then you need to consider
  the order in which you configure a metrics scope and
  your VPC perimeters. Cloud Monitoring performs the VPC perimeter check
  when a project is *added* to a metrics scope:

  - When you create the VPC perimeter first and then try to add a
    project to
    the metrics scope, the perimeter validation process runs. This
    process verifies that the added container is in the same perimeter as the
    scoping project, or that it is connected to the
    scoping project by a [perimeter bridge](https://docs.cloud.google.com/vpc-service-controls/docs/share-across-perimeters.md.txt).
    If the perimeter validation fails, then the addition of the
    project to the metrics scope also fails.

  - When you configure the metrics scope first and then
    create your perimeters, the perimeter validation process doesn't run.
    This approach lets you access time-series data for projects
    that are in different perimeters.

- If you configure IAM roles or grant access to projects,
  then consider the implications of permissions on a project
  whose metrics scope includes projects other than the
  scoping project.
  A role that grants read permission to Monitoring on the
  scoping project lets the principal view charts and alerting policies
  that might display data that is stored by a project included
  in the metrics scope.

## Add projects to a metrics scope

To add projects to a metrics scope, do the following:

1. In the Google Cloud console, go to the
   **Settings** page:

   [Go to **Settings**](https://console.cloud.google.com/monitoring/settings)

   <br />

   If you use the search bar to find this page, then select the result whose subheading is
   **Monitoring**.
2. In the Google Cloud console, select your Google Cloud project. For [App Hub](https://docs.cloud.google.com/app-hub/docs/overview.md.txt) host project configurations, select the host project.
3. Select **Metric Scope**.

   The **Metric Scope** tab lists the resources monitored by the current
   Google Cloud project. It also lists the Google Cloud projects whose
   metrics scope includes the current Google Cloud project.
4. To add Google Cloud projects to the metrics scope:

   1. In the **Google Cloud Projects** pane, click **Add projects**.
   2. On the **Add Google Cloud projects** page, click **Select projects** ,
      select the projects that you want to add, and then click **Select**.

      <br />

      The table on the **Add Google Cloud projects** page is updated to list
      your selections. If you want to remove a Google Cloud project from
      the list before saving, click **Remove project**.
   3. To save your changes and return to the **Settings** page, click
      **Add projects**.


   After you add projects to a metrics scope, it takes about 60 seconds for
   changes to propagate through all Monitoring systems.

   Before you create a chart or alerting policy, wait at least 60 seconds.
   You might need to refresh the Google Cloud console page for the new metrics to be visible.

   The metrics scope of your selected project has been updated to include
   the Google Cloud projects you selected.

## Remove projects from a metrics scope

You might want to remove projects from a metrics scope to improve
performance or to free up quota so that you can add a different project.
For example, by default, a metrics scope can include
375 Google Cloud projects. If you've exhausted this quota,
then you might remove one project so that you can add another.

After you remove a project from a metrics scope, the time-series
data stored in that project can't be charted or monitored by the
scoping project. Removing a project from a metrics scope doesn't
change the configuration of charts,
dashboards, alerting policies, uptime checks, or groups that you defined.
However, the time series displayed on charts and the time series monitored by
alerting policies might change.

To remove projects from a metrics scope, do the following:

1. In the Google Cloud console, go to the
   **Settings** page:

   [Go to **Settings**](https://console.cloud.google.com/monitoring/settings)

   <br />

   If you use the search bar to find this page, then select the result whose subheading is
   **Monitoring**.
2. In the Google Cloud console, select your Google Cloud project. For [App Hub](https://docs.cloud.google.com/app-hub/docs/overview.md.txt) host project configurations, select the host project.
3. Select **Metric Scope**.
4. In the **Google Cloud Projects** pane, select the projects that you want to remove, click **Remove project**, and then complete the confirmation dialog.

## List projects in a metrics scope

To list the resources in a metrics scope, do the following:

1. In the Google Cloud console, go to the
   **Settings** page:

   [Go to **Settings**](https://console.cloud.google.com/monitoring/settings)

   <br />

   If you use the search bar to find this page, then select the result whose subheading is
   **Monitoring**.
2. In the Google Cloud console, select your Google Cloud project. For [App Hub](https://docs.cloud.google.com/app-hub/docs/overview.md.txt) host project configurations, select the host project.
3. Select **Metric Scope**.

   The **Metric Scope** tab lists the resources monitored by the current
   Google Cloud project. It also lists the Google Cloud projects whose
   metrics scope includes the current Google Cloud project.

## Request a quota increase

By default, a metrics scope can include
375 Google Cloud projects. However, you can request
an increase of the "Monitored Projects / Monitoring Metrics Scope" quota.
Increasing your quota beyond the default value of
375 Google Cloud projects might cause performance issues.

For instructions about how to request a quota increase, see
[Request a quota adjustment](https://docs.cloud.google.com/docs/quotas/view-manage.md.txt#requesting_higher_quota).

## Select a different metrics scope

The project selected in the Google Cloud console project picker is the
scoping project of the current metrics scope. There is a one-to-one
relationship between a scoping project and a metrics scope.

To select a different metrics scope, select a different project with the
Google Cloud console project picker.

## What's next

- [Quotas and limits](https://docs.cloud.google.com/monitoring/quotas.md.txt)