告警与响应相关接口/告警事件
POSTAlerting起始版本 1.0同步需要认证
验证告警表达式
校验PROM QL表达式语法正确性。
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
expressionString必填表达式。
示例: avg(cpu_usage_percent) > 90
响应状态
请求地址
POST/api/v1/alerting/dry-run/validate
/api/v1/alerting/dry-run/validate
请求示例
curl -X POST '{host}/api/v1/alerting/dry-run/validate' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"expression":"avg(cpu_usage_percent) > 90"}'
响应示例
200{
"valid": true,
"parseError": "connection refused",
"errorPosition": 20,
"suggestion": "consider increasing the threshold",
"exprType": "instant"
}变更历史
此 API 暂无变更历史记录。
