Back to Redis

Alerts

content/operate/rs/references/rest-api/requests/cluster/alerts.md

latest3.1 KB
Original Source
MethodPathDescription
GET/v1/cluster/alertsGet all cluster alerts
GET/v1/cluster/alerts/{alert}Get a specific cluster alert

Get all cluster alerts {#get-all-alerts}

GET /v1/cluster/alerts

Get all alert states for the cluster object.

Required permissions

Permission name
[view_cluster_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_alerts" >}})

Request {#get-all-request}

Example HTTP request

GET /v1/cluster/alerts 

Request headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

Query parameters

FieldTypeDescription
ignore_settingsbooleanRetrieve updated alert state regardless of the cluster’s alert_settings. When not present, a disabled alert will always be retrieved as disabled with a false state. (optional)

Response {#get-all-response}

Returns a hash of [alert objects]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) and their states.

Example JSON body

json
{
    "cluster_too_few_nodes_for_replication": {
        "change_time": "2014-12-22T11:48:00Z",
        "change_value": {
            "state": false
        },
       "enabled": true,
       "state": "off",
       "severity": "WARNING",
    },
    "..."
}

Status codes {#get-all-status-codes}

CodeDescription
200 OKNo error

Get cluster alert {#get-alert}

GET /v1/cluster/alerts/{alert}

Get a cluster alert state.

Required permissions

Permission name
[view_cluster_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_alerts" >}})

Request {#get-request}

Example HTTP request

GET /v1/cluster/alerts/cluster_too_few_nodes_for_replication 

Request headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

Query parameters

FieldTypeDescription
ignore_settingsbooleanRetrieve updated alert state regardless of the cluster’s alert_settings. When not present, a disabled alert will always be retrieved as disabled with a false state. (optional)

Response {#get-response}

Returns an [alert object]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}).

Example JSON body

json
{
    "change_time": "2014-12-22T11:48:00Z",
    "change_value": {
        "state": false
    },
   "enabled": true,
   "state": "off",
   "severity": "WARNING",
}

Status codes {#get-status-codes}

CodeDescription
200 OKNo error
404 Not FoundSpecified alert does not exist