Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X PUT http://localhost:5080/api/v1/alerts/rules/$RULE_ID \ -H "authorization: Bearer $MS_JWT" \ -H 'content-type: application/json' \ --data-binary @- <<'EOF' { "name": "High error rate", "description": "More than 200 errors in five minutes", "enabled": true, "kind": "scheduled", "query": { "language": "sql", "statement": "SELECT count(*) AS c FROM app WHERE level = 'error'", "period_secs": 300, "stream": { "name": "app", "stream_type": "logs" } }, "trigger": { "operator": "gt", "threshold": 200, "for_periods": 2, "silence_secs": 0 }, "severity": "critical", "labels": { "team": "checkout" } } EOF
替换告警规则的配置。
PUT /api/v1/alerts/rules/{id}
id
created_at
last_eval_at
last_state
escalation_policy_id
default
alerts.manage
true
enabled
scheduled
kind
labels
annotations
thresholds
400
404
422