MethodPathDescription
GET/v1/cluster/alertsGet all cluster alerts
GET/v1/cluster/alerts/{alert}Get a specific cluster alert

Get all cluster alerts

GET /v1/cluster/alerts

Get all alert states for the cluster object.

Required permissions

Permission name
view_cluster_alerts

Request

Example HTTP request

GET /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

Returns a hash of alert objects and their states.

Example JSON body

{
    "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

CodeDescription
200 OKNo error

Get cluster alert

GET /v1/cluster/alerts/{alert}

Get a cluster alert state.

Required permissions

Permission name
view_cluster_alerts

Request

Example HTTP request

GET /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

Returns an alert object.

Example JSON body

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

Status codes

CodeDescription
200 OKNo error
404 Not FoundSpecified alert does not exist