基于 VPN 网关指标设置警报Set up alerts on VPN Gateway metrics
本文介绍如何基于 Azure VPN 网关指标设置警报。This article helps you set up alerts on Azure VPN Gateway metrics. Azure Monitor 提供为 Azure 资源设置警报的功能。Azure Monitor provides the ability to set up alerts for Azure resources. 可以为“VPN”类型的虚拟网关设置警报。You can set up alerts for virtual network gateways of the "VPN" type.
指标Metric | 单位Unit | 粒度Granularity | 说明Description |
---|---|---|---|
AverageBandwidthAverageBandwidth | 字节/秒Bytes/s | 5 分钟5 minutes | 网关上所有站点到站点连接的组合带宽平均利用率。Average combined bandwidth utilization of all site-to-site connections on the gateway. |
P2SBandwidthP2SBandwidth | 字节/秒Bytes/s | 1 分钟1 minute | 网关上所有点到站点连接的组合带宽平均利用率。Average combined bandwidth utilization of all point-to-site connections on the gateway. |
P2SConnectionCountP2SConnectionCount | 计数Count | 1 分钟1 minute | 网关上点到站点连接的计数。Count of point-to-site connections on the gateway. |
TunnelAverageBandwidthTunnelAverageBandwidth | 字节/秒Bytes/s | 5 分钟5 minutes | 在网关上创建的隧道的带宽平均利用率。Average bandwidth utilization of tunnels created on the gateway. |
TunnelEgressBytesTunnelEgressBytes | 字节Bytes | 5 分钟5 minutes | 在网关上创建的隧道中的传出流量。Outgoing traffic on tunnels created on the gateway. |
TunnelEgressPacketsTunnelEgressPackets | 计数Count | 5 分钟5 minutes | 在网关上创建的隧道中的传出数据包的计数。Count of outgoing packets on tunnels created on the gateway. |
TunnelEgressPacketDropTSMismatchTunnelEgressPacketDropTSMismatch | 计数Count | 5 分钟5 minutes | 隧道中因流量选择器不匹配导致的被丢弃传出数据包的计数。Count of outgoing packets dropped on tunnels caused by traffic-selector mismatch. |
TunnelIngressBytesTunnelIngressBytes | 字节Bytes | 5 分钟5 minutes | 在网关上创建的隧道中的传入流量。Incoming traffic on tunnels created on the gateway. |
TunnelIngressPacketsTunnelIngressPackets | 计数Count | 5 分钟5 minutes | 在网关上创建的隧道中的传入数据包的计数。Count of incoming packets on tunnels created on the gateway. |
TunnelIngressPacketDropTSMismatchTunnelIngressPacketDropTSMismatch | 计数Count | 5 分钟5 minutes | 隧道中因流量选择器不匹配导致的被丢弃传入数据包的计数。Count of incoming packets dropped on tunnels caused by traffic-selector mismatch. |
使用 Azure 门户基于指标设置 Azure Monitor 警报Set up Azure Monitor alerts based on metrics by using the Azure portal
以下示例步骤将在网关上针对以下项创建一个警报:The following example steps will create an alert on a gateway for:
- 指标: TunnelAverageBandwidthMetric: TunnelAverageBandwidth
- 条件: 带宽 > 10 字节/秒Condition: Bandwidth > 10 bytes/second
- 时限: 5 分钟Window: 5 minutes
- 警报操作: EmailAlert action: Email
转到虚拟网关资源,从“监视”选项卡中选择“警报”。 然后创建新的警报规则,或者编辑现有的警报规则。Go to the virtual network gateway resource and select Alerts from the Monitoring tab. Then create a new alert rule or edit an existing alert rule.
选择 VPN 网关作为资源。Select your VPN gateway as the resource.
选择要为警报配置的指标。Select a metric to configure for the alert.
配置信号逻辑。Configure the signal logic. 它有三个组件:There are three components to it:
a.a. 维度:如果指标包含维度,则可选择特定的维度值,这样警报就只评估该维度的数据。Dimensions: If the metric has dimensions, you can select specific dimension values so that the alert evaluates only data of that dimension. 这些是可选的。These are optional.
b.b. 条件:这是用于评估指标值的操作。Condition: This is the operation to evaluate the metric value.
c.c. 时间:指定指标数据的粒度以及时间段,以便评估警报。Time: Specify the granularity of metric data, and the period of time to evaluate the alert.
若要查看配置的规则,请选择“管理警报规则”。 To view the configured rules, select Manage alert rules.
后续步骤Next steps
若要基于隧道资源日志配置警报,请参阅基于 VPN 网关资源日志设置警报。To configure alerts on tunnel resource logs, see Set up alerts on VPN Gateway resource logs.