API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola

PATCH /v1/agents/alert-rules/{ruleId}

PATCH/v1/agents/alert-rules/{ruleId}

Update an agent alert rule

Cuerpo de la solicitud

NombreTipoDescripción
namestring
enabledboolean
metricstring
operatorstring
thresholdnumber
severitystring
cooldownMinutesinteger
notifyChannelsstring[]

Parámetros de ruta

NombreTipoDescripción
ruleIdobligatoriostring

Ejemplo

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": []
});

Códigos de respuesta

HTTP Significado
200 Default Response

Búsqueda