Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Google Cloud Platform Foundation v5.0.0 · 2.9

Changes to VPC network routes should raise an alert

  • Level 2
  • Logging and Monitoring

This check looks for a log-based metric that matches VPC route changes and an alerting policy attached to it. The safe setting is a metric with a filter for route create, patch and delete events, plus an alert that notifies someone when it fires.

Why it matters

Routes decide where traffic in a VPC network goes. A changed or added route can send traffic through an unexpected path or cut a service off, and such a change is usually deliberate only when someone planned it. Cloud Audit Logs record these operations, and a log-based metric turns matching log entries into a count that Cloud Monitoring can alert on (Google Cloud log-based metrics).

Google notes that a user-defined log-based metric counts only entries received after it is created, so an alert set up late will not tell you about earlier changes.

How to check it yourself

In the Google Cloud console open Logging > Log-based metrics and look in the user-defined list for a counter whose filter mentions route operations. Then open Monitoring > Alerting and confirm a policy uses that metric.

Read-only commands:

gcloud logging metrics list --project 
gcloud logging metrics describe  --project 
gcloud monitoring policies list --project 

The metric's filter field should match Compute Engine route events, and a policy should reference logging.googleapis.com/user/<metric-name>. If either is missing, the check fails.

How to fix it

Create a counter metric under Logging > Log-based metrics > Create metric with a filter on Compute route operations, for example:

resource.type="gce_route"
AND (protoPayload.methodName:"compute.routes.delete"
  OR protoPayload.methodName:"compute.routes.insert")
gcloud logging metrics create vpc-route-changes \
  --description="VPC route changes" \
  --log-filter='resource.type="gce_route" AND (protoPayload.methodName:"compute.routes.delete" OR protoPayload.methodName:"compute.routes.insert")'

Then create an alerting policy on logging.googleapis.com/user/vpc-route-changes in Monitoring > Alerting, with a notification channel your team reads. Google recommends choosing how the policy handles missing data, because the series can have gaps. ConfigCobra itself never changes your projects; run these steps yourself and test them in a sandbox project first.

What changes when you fix it

Nothing changes for workloads or end users; the metric only counts log entries and the policy only sends notifications. The people affected are whoever sits on the notification channel, who will start receiving a message each time a route changes, including routine changes by your own network team.

Google states that user-defined log-based metrics are chargeable as custom metrics, so the project owner may see a small new line on the bill. Because the metric is created per project, repeat it in every project in scope, or use a shared log scope if your design has one.

Included in

BenchmarkCIS IDProfile
CIS Google Cloud Platform Foundation v5.0.02.9Level 2

Check this on your Google Cloud

ConfigCobra runs this check with every other control of the CIS Google Cloud Platform Foundation Benchmark, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial