Skip to content

Alert#

List alerts and acknowledge alert. Acknowledge is done on the parent alert.

You need to provide authentication parameters for all queries. To learn more, see API Introduction.

Find out more about the alerts

List Alerts#

Code samples

curl -X GET {server}/alerts/api/alerts \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {access-token}'

GET /alerts/api/alerts

List of alerts

Parameters

Name In Type Required Description
from query integer false Unix timestamp, in millis
to query integer false Unix timestamp, in millis

Example responses

200 Response

{
  "range": {
    "from": "1598283340",
    "to": "1598283340"
  },
  "alerts": [
    {
      "id": "string",
      "alertname": "string",
      "category": "string",
      "clearedat": 0,
      "duration": 0,
      "eventname": "string",
      "eventtext": "string",
      "eventtype": "string",
      "event_expiration": "string",
      "event_clear_on_ack": null,
      "event_state": "string",
      "host": "string",
      "measurement": "string",
      "message": "string",
      "openedat": "string",
      "resource": "string",
      "resource_address": "string",
      "resource_component": "string",
      "resource_component_type": "string",
      "resource_parent": "string",
      "resource_parent_type": "string",
      "resource_type": "string",
      "root_cause": "string",
      "technology": "string",
      "triggerType": "string",
      "unit": "%",
      "updatedat": 0,
      "url": "string",
      "value": null,
      "severity": "WARNING",
      "ack": {
        "user": "string",
        "time": 1598288637746,
        "value": true
      },
      "metadata": null
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Received a list of alerts Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
ยป range object false none none
ยปยป from string false none none
ยปยป to string false none none
ยป alerts [object] false none none
ยปยป id string false none none
ยปยป alertname string false none none
ยปยป category string false none none
ยปยป clearedat integer false none none
ยปยป duration integer false none none
ยปยป eventname string false none none
ยปยป eventtext string false none none
ยปยป eventtype string false none none
ยปยป event_expiration string false none none
ยปยป event_clear_on_ack bool pointer false none none
ยปยป event_state string false none none
ยปยป host string false none none
ยปยป measurement string false none none
ยปยป message string false none none
ยปยป openedat string false none none
ยปยป resource string false none none
ยปยป resource_address string false none none
ยปยป resource_component string false none none
ยปยป resource_component_type string false none none
ยปยป resource_parent string false none none
ยปยป resource_parent_type string false none none
ยปยป resource_type string false none none
ยปยป root_cause string false none none
ยปยป technology string false none none
ยปยป triggerType string false none none
ยปยป unit string false none none
ยปยป updatedat integer false none none
ยปยป url string false none none
ยปยป value float false none none
ยปยป severity string false none Severity of the alerts
ยปยป ack object false none none
ยปยปยป user string false none none
ยปยปยป time integer(int64) false none unix timestamp
ยปยปยป value boolean false none none
ยปยป metadata map false none none

Enumerated Values#

Property Value
severity WARNING
severity INFO
severity CRITICAL

Acknowledge an alert#

Code samples

curl -X POST {server}/alerts/api/ack \
  -H 'Content-Type: application/json' \
  -H 'Accept: application\json' \
  -H 'Authorization: Basic {access-token}'

POST /alerts/api/ack

Acknowledge an alert.

Body parameter

{
  "ack": true,
  "alert": "string"
}

Parameters

Name In Type Required Description
body body object true none
ยป ack body boolean false none
ยป alert body string false ID of the alert list

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK Received acknowlegement on a given alert. If the alert is not correct (wrong id) the API will return 200 with null Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
ยป user string false none none
ยป time integer(int64) false none unix timestamp
ยป value boolean false none none

Clear an alert#

Code samples

curl -X POST {server}/api/v1/clear \
  -H 'Content-Type: application/json' \
  -H 'Accept: application\json' \
  -H 'Authorization: Basic {access-token}'

POST /api/v1/clear

Clear an alert.

Body parameter

{
  "alert": "string"
}

Parameters

Name In Type Required Description
body body object true none
ยป alert body string false ID of the alert

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK Alert that has been cleared. Inline
404 Not Found Alert not found from given ID. None
409 Conflict Alert has already been cleared. None

Response Schema

Status Code 200

Name Type Required Restrictions Description
ยป id string false none none
ยป alertname string false none none
ยป category string false none none
ยป clearedat integer false none none
ยป duration integer false none none
ยป eventname string false none none
ยป eventtext string false none none
ยป eventtype string false none none
ยป event_expiration string false none none
ยป event_clear_on_ack bool pointer false none none
ยป event_state string false none none
ยป host string false none none
ยป measurement string false none none
ยป message string false none none
ยป openedat string false none none
ยป resource string false none none
ยป resource_address string false none none
ยป resource_component string false none none
ยป resource_component_type string false none none
ยป resource_parent string false none none
ยป resource_parent_type string false none none
ยป resource_type string false none none
ยป root_cause string false none none
ยป technology string false none none
ยป triggerType string false none none
ยป unit string false none none
ยป updatedat integer false none none
ยป url string false none none
ยป value float false none none
ยป severity string false none Severity of the alerts
ยป ack object false none none
ยปยป user string false none none
ยปยป time integer(int64) false none unix timestamp
ยปยป value boolean false none none
ยป metadata map false none none

Enumerated Values#

Property Value
severity WARNING
severity INFO
severity CRITICAL