Viewing logs

Cloud Logging logs the following events for Cloud Router:

  • Router events related to Cloud Router
  • BGP events related to a BGP configuration and session
  • Route events related to route announcements between the two BGP peers

To view logs, open the Cloud Router list, then click View in the Logs column.

Cloud Router logs have the following format:

[Event Type]: [Log Text]

Router events

Router events are related to the Cloud Router itself.

INFO log entries

  • Router Event: Router task activated
  • Router Event: Router task deactivated

BGP events

BGP events are related to a BGP configuration and session.

INFO log entries

  • BGP Event: Successfully added configuration for peers: [LIST_OF_PEERS]
  • BGP Event: BGP peering with [PEER] came up X seconds ago
  • BGP Event: BGP peering with [PEER] went down
  • BGP Event: BGP Router ID set to: [BGP_ROUTER_ID]

Route events

Route events are related to route announcements between the two BGP peers.

INFO log entries

  • Route Event: Advertising prefix to peers: [PREFIX]
  • Route Event: Withdrawing prefix from peers: [PREFIX]
  • Prefix [PREFIX] Nexthops [LIST_OF_NEXTHOPS] received by cloud router
  • Prefix [PREFIX] Nexthops [LIST_OF_NEXTHOPS] deleted from cloud router

ERROR log entries

  • Route Event: Dropping Route: [PREFIX] Maximum allowed routes MAX_ROUTES already in Datapath
    If you get this error, reduce the number of prefixes announced from the peer router to the [MAX_ROUTES] value.

Viewing other events using advanced queries

To view other common Logging events for Cloud Router, follow the steps for creating advanced logs queries and specify one of the following advanced filters. Adjust the time frame for the Logging search as needed.

Event Use this advanced filter
A Cloud Router process was migrated or restarted.
"task activated"
Learned routes are being added as custom dynamic routes to the Virtual Private Cloud (VPC) network.
("Prefix" AND "received by cloud router")
Custom dynamic routes are being removed from the VPC network.
("Prefix" AND "deleted from cloud router")
Cloud Router is exporting routes.
("Route Event" AND "Advertising prefix")
BGP peering came up.
("BGP peering" AND "came up")
BGP peering went down.
("BGP peering" AND "went down")
A Cloud Router limit has been exceeded.
("Route quota exceeded:")
A BGP session was terminated due to excessive received routes.
("shut down" AND "reached the limit")

Specifying a Cloud Router in a query

The advanced searches in the previous section return results for all Cloud Routers in a project. However, you can specify a particular Cloud Router by adding a line like the following to your advanced query.


Replace router-id with the router's ID number. You can determine the router's ID by using the following gcloud command:

  gcloud compute routers describe router-name \
      --region=region \

In the gcloud command above, replace the following:

  • router-name: The name of the Cloud Router
  • region: The Google Cloud region where the Cloud Router is located.