PATCH /v1/agents/alert-rules/{ruleId}
PATCH/v1/agents/alert-rules/{ruleId}
Update an agent alert rule
Request Body
| Name | Typ | Beschreibung |
|---|
name | string | |
enabled | boolean | |
metric | string | |
operator | string | |
threshold | number | |
severity | string | |
cooldownMinutes | integer | |
notifyChannels | string[] | |
Pfad-Parameter
| Name | Typ | Beschreibung |
|---|
ruleIderforderlich | string | |
Beispiel
curl -X PATCH https://api.codemeta-os.de/v1/agents/alert-rules/{ruleId} \
-H "X-Tenant-Id: $TENANT" \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"name": "string",
"enabled": false,
"metric": "cpuPercent",
"operator": "gt",
"threshold": 0,
"severity": "critical",
"cooldownMinutes": 0,
"notifyChannels": []
}'
const result = await cm.agents.patch({
"name": "string",
"enabled": false,
"metric": "cpuPercent",
"operator": "gt",
"threshold": 0,
"severity": "critical",
"cooldownMinutes": 0,
"notifyChannels": []
});
Antwortcodes
| HTTP |
Bedeutung |
200 |
Default Response |