v1

latestOpenAPI 3.0.12026-07-13149396412.1 KB
LogScaleAlert

put/api/v1/config/log-scale-alerts/{slug}

Path parameters

slugstring required

Request body

create_if_missingboolean

If true, the LogScaleAlert will be created if it does not already exist, identified by slug. If false, an error will be returned if the LogScaleAlert does not already exist.

dry_runboolean

If true, the LogScaleAlert isn't created or updated, and no response LogScaleAlert will be returned. The response will return an error if the given LogScaleAlert is invalid.

Example request

{
  "log_scale_alert": {
    "log_scale_query": "level = ERROR | severity > 3 | count(as=numErrors) | numErrors > 500",
    "time_window_secs": 3600
  }
}

Response

A successful response containing the updated LogScaleAlert.

Example response

{
  "log_scale_alert": {
    "log_scale_query": "level = ERROR | severity > 3 | count(as=numErrors) | numErrors > 500",
    "time_window_secs": 3600
  }
}