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

POST /v1/agents/alert-rules

POST/v1/agents/alert-rules

Create an agent alert rule

Cuerpo de la solicitud

NombreTipoDescripción
nameobligatoriostring
metricobligatoriostring
operatorobligatoriostring
thresholdobligatorionumber
severityobligatoriostring
cooldownMinutesinteger
notifyChannelsstring[]

Ejemplo

curl -X POST https://api.codemeta-os.de/v1/agents/alert-rules \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "name": "string",
  "metric": "cpuPercent",
  "operator": "gt",
  "threshold": 0,
  "severity": "critical",
  "cooldownMinutes": 60,
  "notifyChannels": [
    "in_app"
  ]
}'
const result = await cm.agents.post({
  "name": "string",
  "metric": "cpuPercent",
  "operator": "gt",
  "threshold": 0,
  "severity": "critical",
  "cooldownMinutes": 60,
  "notifyChannels": [
    "in_app"
  ]
});

Códigos de respuesta

HTTP Significado
200 Default Response

Búsqueda