识别路由器维护事件

Cloud Router 路由器使用边界网关协议 (BGP) 在 Virtual Private Cloud (VPC) 网络和本地网络之间交换路由。 Google Cloud 会定期执行软件维护和任务自动重启。在维护期间,本地路由器通常会记录 BGP 关闭事件,后跟 BGP 启动事件(统称为“BGP 抖动”)。

使用路由器任务维护消息识别事件

Google Cloud 控制台中会显示以下消息:Maintenance of router task: BGP sessions will restart. Routes are preserved for the duration of the configured timers. These are normal events, and no data loss is expected to occur.

此消息表明在问题期间或相应时间段内发生了 Cloud Router 路由器事件。

Cloud Router 事件是由 Cloud Router 任务的以下事件之一引起的:

  • 迁移任务
  • 重启任务
  • 升级任务

Cloud Router 任务是 Google Cloud 控制平面中的软件进程,通常在机器之间迁移。在这些迁移过程中,Cloud Router 路由器可能会停机几秒钟。由于这些迁移是在数据平面之外完成的,因此正常迁移不会导致流量舍弃。

使用基于日志的指标来识别事件

控制台

  1. 在 Google Cloud 控制台中,前往 Cloud Router 路由器页面。

    前往“Cloud Router 路由器”

  2. 从 Cloud Router 路由器列表中找到 Cloud Router 路由器。

  3. 日志列中,点击查看

    默认查询会显示在查询构建器中。

  4. 从默认查询中,记下 resource.labels.router_id 变量的路由器 ID 的值。

  5. 使用上一查询中的 resource.labels.router_id 值构建如下新查询:

    resource.labels.router_id=ROUTER_ID
    textPayload=~"Maintenance of router task: BGP sessions will restart."
    
  6. 使用先前的查询创建包含维护事件通知的提醒。

    此通知会在首次创建路由器时显示,并在每个维护事件期间显示。

    如需详细了解如何创建提醒,请参阅创建关于计数器指标的提醒政策

验证本地路由器与 Cloud Router 路由器之间的连接

要确保 BGP 抖动并不是由本地路由器与 Cloud Router 路由器之间的连接中断引起的,可以使用以下方法进行验证:

  • 对于与 Cloud VPN 结合使用的 Cloud Router,请为 network/received_packets_countnetwork/sent_packets_count 设置信息中心以监控连接是否丢失。如需了解详情,请参阅查看 VPN 指标
  • 对于与 Cloud Interconnect 结合使用的 Cloud Router,请为 network/attachment/sent_packets_countnetwork/attachment/received_packets_count 设置信息中心,以监控 VLAN 连接的连接。如需了解详情,请参阅互连指标

在 Cloud Router 路由器维护事件期间,信息中心可能不会显示与事件一致的任何连接缺口。如果维护事件与丢包之间存在关联,请向 Google Cloud 支持团队提交工单,以供进一步调查。

后续步骤