content/operate/rs/7.22/references/rest-api/requests/cluster/alerts.md
| Method | Path | Description |
|---|---|---|
| GET | /v1/cluster/alerts | Get all cluster alerts |
| GET | /v1/cluster/alerts/{alert} | Get a specific cluster alert |
GET /v1/cluster/alerts
Get all alert states for the cluster object.
| Permission name |
|---|
| [view_cluster_alerts]({{< relref "/operate/rs/7.22/references/rest-api/permissions#view_cluster_alerts" >}}) |
GET /v1/cluster/alerts
| Key | Value | Description |
|---|---|---|
| Host | cnm.cluster.fqdn | Domain name |
| Accept | application/json | Accepted media type |
| Field | Type | Description |
|---|---|---|
| ignore_settings | boolean | Retrieve 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) |
Returns a hash of [alert objects]({{< relref "/operate/rs/7.22/references/rest-api/objects/alert" >}}) and their states.
{
"cluster_too_few_nodes_for_replication": {
"change_time": "2014-12-22T11:48:00Z",
"change_value": {
"state": false
},
"enabled": true,
"state": "off",
"severity": "WARNING",
},
"..."
}
| Code | Description |
|---|---|
| 200 OK | No error |
GET /v1/cluster/alerts/{alert}
Get a cluster alert state.
| Permission name |
|---|
| [view_cluster_alerts]({{< relref "/operate/rs/7.22/references/rest-api/permissions#view_cluster_alerts" >}}) |
GET /v1/cluster/alerts/cluster_too_few_nodes_for_replication
| Key | Value | Description |
|---|---|---|
| Host | cnm.cluster.fqdn | Domain name |
| Accept | application/json | Accepted media type |
| Field | Type | Description |
|---|---|---|
| ignore_settings | boolean | Retrieve 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) |
Returns an [alert object]({{< relref "/operate/rs/7.22/references/rest-api/objects/alert" >}}).
{
"change_time": "2014-12-22T11:48:00Z",
"change_value": {
"state": false
},
"enabled": true,
"state": "off",
"severity": "WARNING",
}
| Code | Description |
|---|---|
| 200 OK | No error |
| 404 Not Found | Specified alert does not exist |