提醒
创建警报规则,以便在度量标准超过定义的阈值时发送警报事件。警报可以在和上触发warningThreshold``criticalThreshold,如果度量值低于或超过预期阈值,则触发警报事件。
要接收由警报触发的事件,您需要能够从您选择的接收器中订阅的流接收事件。警报触发的事件在客户门户或API中不可用。
要查看支持的指标列表,请参阅指标页面。
创建警报
前提条件:要添加警报规则,您应创建一个流,其中附加了端口和/或连接资源并启用了度量
- Portal
- API
-
从_Observability_菜单中,单击数据流。
-
从_流库存_中选择流。

-
在_Stream Details_页面的_Actions_下拉菜单中,单击添加警报。

-
在_Add Alert_页面上,输入规则参数。
- 从_选择指标_下拉列表中选择连接或端口指标。
- 为您的警报命名。
- 添加警报说明(可选)。
- 选择操作数值:
ABOVE或BELOW。 - 从下拉列表中选择窗口大小。
- 在_Warning Threshold_字段中设置触发警告事件的值。
- 在_Critical Threshold_字段中设置触发严重事件的值。

-
点击“下一步”。
-
从列表中选择要将警报应用到的连接或端口。

-
- 单击“Submit”(提交)。
在确认屏幕中,您可以向提醒添加更多资源,向流添加订阅以接收提醒,或添加其他提醒。要查看新提醒的详细信息,请单击查看提醒详细信息。

要创建警报,请向端点发送POST请求/fabric/v4/streams/{streamId}/alertRules。
卷曲请求示例:
curl -X 'POST' 'https://api.equinix.com/fabric/v4/streams/<streamId>/alertRules' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <Bearer Token>' \
-d '{
"type": "METRIC_ALERT",
"name": "<alert_rule_name>",
"description": "<alert_rule_desc>",
"enabled": "true",
"metricSelector": {
"include": [
"equinix.fabric.port.bandwidth_tx.usage"
]
},
"resourceSelector": {
"include": [
"/fabric/v4/ports/780d384f-2eb6-4c07-ac89-ea106ca12814"
]
},
"detectionMethod": {
"type": "THRESHOLD",
"operand": "ABOVE",
"windowSize": "PT5M",
"warningThreshold": 200000,
"criticalThreshold": 300000
}
}'
示例响应:
{
"href": "https://api.equinix.com/fabric/v4/streams/128cfe7c-e24f-4b1b-8a4f-680cd650c46c/alertRules/28da40d8-09bf-49f2-a02d-af34210f275e",
"uuid": "128cfe7c-e24f-4b1b-8a4f-680cd650c46c",
"type": "METRIC_ALERT",
"name": "<alert_rule_name>",
"description": "<alert_rule_name>",
"state": "ACTIVE",
"enabled": true,
"metricSelector": {
"include": [
"equinix.fabric.port.bandwidth_tx.usage"
]
},
"resourceSelector": {
"include": [
"/fabric/v4/ports/780d384f-2eb6-4c07-ac89-ea106ca12814"
]
},
"detectionMethod": {
"type": "THRESHOLD",
"operand": "ABOVE",
"windowSize": "PT5M",
"warningThreshold": 200000,
"criticalThreshold": 300000
}
"changeLog": {
"createdBy": "testuser",
"createdDateTime": "2025-02-04T23:17:54.323427936Z"
}
}
Creating Smart Alerts (创建智能警报)- Latency (延迟)
对于已连接Metros的流, 您可以为延迟阈值创建智能警报。这些AI支持的警报使用机器学习分析跨城域的历史延迟数据,以建立基准性能并生成智能警报阈值,从而无需手动配置警报。
- Portal
- API
要创建智能警报规则,请按照创建警报的相同步骤操作,以及:
-
从_选择指标_下拉菜单中选择结构城域延迟指标。
-
为您的警报提供名称和说明(可选)。单击Next。

-
选择要对其应用智能警报规则的地铁或地铁。

-
- 单击“Submit”(提交)。
您的警报将出现在警报列表中。

要创建智能警报规则,请向终结点发送POST请求/fabric/v4/streams/{streamId}/alertRules。
在对象中指定要为其创建警报的Metro特定度量metricSelector,即附加到要作为对象中的资源添加的流的MetroresourceSelector,并指定detectionMethod.type为OUTLIER。
curl -X 'POST' 'https://api.equinix.com/fabric/v4/streams/<streamId>/alertRules' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <Bearer Token>' \
-d '{
"type": "METRIC_ALERT",
"name": "<alert_rule_name>",
"description": "<alert_rule_description>",
"enabled": true,
"metricSelector": {
"include": [
"equinix.fabric.metro.<metro_code>_<metro_code>.latency"
]
},
"resourceSelector": {
"include": [
"/fabric/v4/metros/{metro_code}"
]
},
"detectionMethod": {
"type": "OUTLIER"
}
}'
正在检索警报
- Portal
- API
要查看流的警报列表:
-
从_Observability_菜单中,单击数据流。
-
从_流库存_中选择流。

-
单击Alerts。

要获取警报的详细信息,请向终结点发送GET请求/fabric/v4/streams/{streamId}/alertRules/{alertRuleId}。
卷曲请求示例:
curl -X 'GET' 'https://api.equinix.com/fabric/v4/streams/<streamId>/alertRules/<alertRuleId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <Bearer Token>'
示例响应:
{
"href": "https://api.equinix.com/fabric/v4/streams/128cfe7c-e24f-4b1b-8a4f-680cd650c46c/alertRules/28da40d8-09bf-49f2-a02d-af34210f275e",
"uuid": "128cfe7c-e24f-4b1b-8a4f-680cd650c46c",
"type": "METRIC_ALERT",
"name": "<alert_rule_name>",
"description": "<alert_rule_name>",
"state": "ACTIVE",
"enabled": true,
"metricSelector": {
"include": [
"equinix.fabric.port.bandwidth_tx.usage"
]
},
"resourceSelector": {
"include": [
"/fabric/v4/ports/780d384f-2eb6-4c07-ac89-ea106ca12814"
]
},
"detectionMethod": {
"type": "THRESHOLD",
"operand": "ABOVE",
"windowSize": "PT5M",
"warningThreshold": 200000,
"criticalThreshold": 300000
}
"changeLog": {
"createdBy": "testuser",
"createdDateTime": "2025-02-04T23:17:54.323427936Z"
}
}
删除警报
- Portal
- API
要删除警报:
-
从_Observability_菜单中,单击数据流。
-
从_流库存_中选择流。

-
单击Alerts。
-
从"警报"列表中,单击要删除的警报的选项菜单,然后单击Remove Alert。

要删除警报,请向端点发送DELETE请求/fabric/v4/streams/{streamId}/alertRules/{alertRuleId}。
卷曲请求示例:
curl -X DELETE 'https://api.equinix.com/fabric/v4/streams/<streamId>/alertRules/<alertRuleId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <Bearer Token>'
示例响应:
{
"href": "https://api.equinix.com/fabric/v4/streams/128cfe7c-e24f-4b1b-8a4f-680cd650c46c/alertRules/28da40d8-09bf-49f2-a02d-af34210f275e",
"uuid": "28da40d8-09bf-49f2-a02d-af34210f275e",
"type": "METRIC_ALERT",
"name": "<alert_rule_name>",
"description": "<alert_rule_name>",
"state": "INACTIVE",
"enabled": true,
"metricName": "equinix.fabric.port.bandwidth_tx.usage",
"resourceSelector": {
"include": [
"*/ports/<uuid>"
]
},
"windowSize": "PT15M",
"operand": "ABOVE",
"warningThreshold": "43000000",
"criticalThreshold": "45000000",
"changeLog": {
"createdBy": "testuser",
"createdDateTime": "2025-02-04T23:17:54.323427936Z"
}
}