Create alerting policy that monitors a resource group
Stay organized with collections
Save and categorize content based on your preferences.
This document describes how to use the Google Cloud console to create an alerting
policy that monitors a metric for a specific resource group.
A resource group is a dynamic collection of resources, where membership in the
group is defined by some criteria. For example, you might
define a resource group for the Compute Engine virtual machine (VM) instances
that you use for production. After you create that group, you can then
create an alerting policy that monitors only that group of instances. When
you add a VM that matches the group criteria, the alerting policy
automatically monitors that VM.
This content does not apply to log-based alerting policies.
For information about log-based alerting policies, which notify you when a
particular message appears in your logs, see
Monitoring your logs.
Before you begin
To get the permissions that
you need to create and modify alerting policies by using the Google Cloud console,
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.
Ensure that you're familiar with the general concepts of alerting policies.
For information about these topics, see
Alerting overview.
Configure the notification channels that you want to use to receive any
alerts. For redundancy purposes, we also recommend that you create
multiple types of notification channels. For information about these steps,
see Create and manage notification channels.
To create an alerting policy that monitors a resource-group by using the
Cloud Monitoring API, the filter expression must specify a group.id. For
an example of a JSON file that specifies this field,
see Group-aggregate policy.
To create an alerting policy that monitors a resource-group by using the
Google Cloud console, do the following:
In the Google Cloud console, go to the
notificationsAlerting page:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Create alerting policy that monitors a resource group\n\nThis document describes how to use the Google Cloud console to create an alerting\npolicy that monitors a metric for a specific [resource group](/monitoring/groups).\nA *resource group* is a dynamic collection of resources, where membership in the\ngroup is defined by some criteria. For example, you might\ndefine a resource group for the Compute Engine virtual machine (VM) instances\nthat you use for production. After you create that group, you can then\ncreate an alerting policy that monitors only that group of instances. When\nyou add a VM that matches the group criteria, the alerting policy\nautomatically monitors that VM.\n\n\nThis content does not apply to log-based alerting policies.\nFor information about log-based alerting policies, which notify you when a\nparticular message appears in your logs, see\n[Monitoring your logs](/logging/docs/alerting/monitoring-logs).\n\nBefore you begin\n----------------\n\n1.\n\n To get the permissions that\n you need to create and modify alerting policies by using the Google Cloud console,\n\n ask your administrator to grant you the\n\n\n [Monitoring Editor](/iam/docs/roles-permissions/monitoring#monitoring.editor) (`roles/monitoring.editor`)\n IAM role on your project.\n\n\n For more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\n You might also be able to get\n the required permissions through [custom\n roles](/iam/docs/creating-custom-roles) or other [predefined\n roles](/iam/docs/roles-overview#predefined).\n\n For more information about Cloud Monitoring roles,\n see [Control access with Identity and Access Management](/monitoring/access-control).\n2. Ensure that you're familiar with the general concepts of alerting policies.\n For information about these topics, see\n [Alerting overview](/monitoring/alerts).\n\n3. Configure the notification channels that you want to use to receive any\n alerts. For redundancy purposes, we also recommend that you create\n multiple types of notification channels. For information about these steps,\n see [Create and manage notification channels](/monitoring/support/notification-options).\n\n4. Configure the [resource group](/monitoring/groups) that you want to monitor.\n\nCreate alerting policy\n----------------------\n\nTo create an alerting policy that monitors a resource-group by using the\nCloud Monitoring API, the filter expression must specify a `group.id`. For\nan example of a JSON file that specifies this field,\nsee [Group-aggregate policy](/monitoring/alerts/policies-in-json#json-group-aggr).\n\nTo create an alerting policy that monitors a resource-group by using the\nGoogle Cloud console, do the following:\n\n1. In the Google Cloud console, go to the\n *notifications* **Alerting** page:\n\n [Go to **Alerting**](https://console.cloud.google.com/monitoring/alerting)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **Monitoring**.\n2. Select **Create policy**.\n3. Expand the **Select a metric** menu and select the metric type that you want\n to monitor.\n\n4. Restrict the resources to those in a Monitoring group:\n\n 1. Click **Add Filter** and select **Group**.\n 2. Expand *arrow_drop_down* **Value** and select the group name.\n 3. Click **Done**.\n\n You can't modify the group while the group is being used by an\n alerting policy.\n5. Complete the alerting policy. You must configure the condition trigger,\n notifications, documentation, and policy name,\n and then click **Create policy**.\n\nFor more information about the settings in an alerting policy, see\n[Create metric-threshold alerting policies](/monitoring/alerts/using-alerting-ui)."]]