-
Notifications
You must be signed in to change notification settings - Fork 0
GCP Monitoring
udx-github edited this page Jul 3, 2026
·
3 revisions
Creates GCP monitoring alert policies and notification channels for a project.
Use this module when a Rabbit service needs monitoring alerts for Cloud SQL metrics or other GCP resources with Slack or email notifications.
- Google Cloud Monitoring API enablement.
- Alert policies with configurable conditions, thresholds, and durations.
- Multiple alert severity levels.
- Notification channels for email and Slack.
- Notification rate limiting and auto-close periods.
- Notification channel grouping to route alerts to specific channels.
- Per-series alignment configuration.
- GCP credentials with permission to manage monitoring resources.
- The
monitoring.googleapis.comAPI enabled on the project. - A Slack auth token when using Slack notification channels.
- Alert policies reference notification channels by group membership. Each notification channel has a
groupsfield, and each alert policy lists which groups it notifies. -
severitycan beCRITICAL,WARNING, orERROR. -
combinercontrols how multiple conditions combine:ORorAND. -
per_series_alignerandalignment_periodcontrol how metric data is aligned before threshold evaluation.
services:
- name: "GCP Monitoring"
module: "gcp-monitoring"
id: "monitoring"
deployment_order: 140
configurations:
alert_policies:
db_free_storage_space:
display_name: "Database Free Storage Space"
condition_name: "Free storage space threshold"
condition: "metric.type=\"cloudsql.googleapis.com/database/disk/utilization\" AND resource.type=\"cloudsql_database\""
comparison: "COMPARISON_GT"
duration: "60s"
threshold_value: "90"
severity: "CRITICAL"
enabled: true
groups:
- "ops"
notification_channels:
email_ops:
name: "ops@example.com"
type: "email"
email: "ops@example.com"
groups: "ops"| Output | Description |
|---|---|
notification_channel_ids |
The IDs of the created notification channels. |
alert_policy_ids |
The IDs of the created alert policies. |
The fields below are public module inputs under configurations.
configurations:
google_api_name: "monitoring.googleapis.com"
alert_policies:
<policy_key>:
display_name: ""
condition_name: ""
condition: ""
comparison: "COMPARISON_GT"
duration: "60s"
threshold_value: "90"
severity: "CRITICAL"
notification_rate_limit_period: "3600s"
auto_close_period: "24h"
per_series_aligner: "ALIGN_MIN"
alignment_period: "60s"
combiner: "OR"
enabled: true
documentation_content: ""
environment: "development"
groups: []
notification_channels:
<channel_key>:
name: ""
type: "email"
email: ""
groups: ""| Field | Type | Required | Description |
|---|---|---|---|
google_api_name |
string | No | GCP API to enable. Defaults to monitoring.googleapis.com. |
alert_policies |
map[alert_policy] | No | Map of alert policy definitions. |
notification_channels |
map[notification_channel] | No | Map of notification channel definitions. |
| Field | Type | Required | Description |
|---|---|---|---|
display_name |
string | Yes | Alert policy display name. |
condition_name |
string | Yes | Condition display name. |
condition |
string | Yes | Monitoring filter expression. |
comparison |
string | Yes | Comparison operator, such as COMPARISON_GT. |
duration |
string | No | Duration the condition must be met. Defaults to 60s. |
threshold_value |
string | Yes | Threshold value for the condition. |
severity |
string | No | Alert severity: CRITICAL, WARNING, or ERROR. Defaults to CRITICAL. |
notification_rate_limit_period |
string | No | Minimum interval between notifications. Defaults to 3600s. |
auto_close_period |
string | No | Auto-close duration for incidents. Defaults to 24h. |
per_series_aligner |
string | No | Alignment function. Defaults to ALIGN_MIN. |
alignment_period |
string | No | Alignment period. Defaults to 60s. |
combiner |
string | No | Condition combiner: OR or AND. Defaults to OR. |
enabled |
boolean | No | Enables the alert policy. Defaults to true. |
documentation_content |
string | No | Documentation attached to the alert. |
environment |
string | No | Environment label. Defaults to development. |
groups |
array[string] | No | Notification channel groups to notify. |
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Channel display name. |
type |
string | Yes | Channel type: email or slack. |
email |
string | Conditional | Email address. Required when type is email. |
channel_name |
string | Conditional | Slack channel name. Required when type is slack. |
team |
string | Conditional | Slack workspace name. Required when type is slack. |
auth_token |
string | Conditional | Slack auth token. Required when type is slack. |
groups |
string | Yes | Group identifier for routing alerts. |
- AWS ACM Certificate
- AWS CloudFormation Stack
- AWS CloudFront Distribution
- AWS CloudFront Response Headers Policy
- AWS Route53 DNS
- AWS WAF
- GCP GKE Cluster
- GCP GKE Node Pool
- GCP IAM
- GCP Monitoring
- GCP Networking
- GCP PostgreSQL Instance
- GCP Secret Manager
- GCP SQL Instance
- GCP Static IP
- GCP Storage
- Ghost Inspector Sync
- K8s Access
- K8s ConfigMap
- K8s Deployment
- K8s HPA
- K8s HTTP Gateway Route
- K8s HTTP Health Check Policy
- K8s Memcached
- K8s Namespace
- K8s PDB
- K8s Secret
- K8s Service
- K8s Shared HTTP Gateway
- NewRelic APM Browser
- NewRelic Synthetic Monitors