本文档介绍了网络服务监控使用的指标和元数据标签,这些指标和标签可用于直观呈现服务通信路径、识别高吞吐量服务和分析连接健康状况。
网络指标
网络服务监控使用以下网络指标(第 4 层)。
| 指标 | 种类 | 说明 |
|---|---|---|
networkservices.googleapis.com/proxy.network.connection.count |
UpDownCounter | 由代理管理的网络连接数 |
networkservices.googleapis.com/proxy.network.connection.duration |
直方图 | 连接时长(从建立到关闭)的分布 |
networkservices.googleapis.com/proxy.network.connection.resets |
计数器 | 通过重置 (RST) 数据包终止的连接的累计数量 |
networkservices.googleapis.com/proxy.network.connection.timeouts |
计数器 | 因超时而由代理终止的网络连接的累计数量 |
networkservices.googleapis.com/proxy.network.errors |
计数器 | 代理检测到的内部错误的累计数量 |
networkservices.googleapis.com/proxy.network.io |
计数器 | 代理传输和接收的累计字节数 |
networkservices.googleapis.com/proxy.network.tls.handshake.errors |
计数器 | 失败的 TLS 握手的累计次数 |
您可以使用以下策略来分析网络指标:
- 如需确定资源的网络吞吐量,请监控
proxy.network.io指标。 - 如需识别网络错误、超时、重置或失败的 TLS 握手,请监控
proxy.network.errors、proxy.network.connection.timeouts、proxy.network.connection.resets和proxy.network.tls.handshake.errors指标。
App Hub 元数据标签
如果资源已在 App Hub 中注册,系统会自动向上述指标添加以下标签,以标识来源资源和目标资源:
- 来源元数据:
apphub_source_application_containerapphub_source_application_idapphub_source_application_locationapphub_source_service_criticality_typeapphub_source_service_environment_typeapphub_source_service_idapphub_source_workload_criticality_typeapphub_source_workload_environment_typeapphub_source_workload_id
- 目标元数据:
apphub_destination_application_containerapphub_destination_application_idapphub_destination_application_locationapphub_destination_service_criticality_typeapphub_destination_service_environment_typeapphub_destination_service_idapphub_destination_workload_criticality_typeapphub_destination_workload_environment_typeapphub_destination_workload_id
后续步骤
- 在 App Hub 中注册服务和工作负载
- 在应用监控中调查应用、服务和工作负载