{
  "id": "alerts",
  "title": "Database alerts requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/bdbs/alerts/",
  "summary": "Database alert requests",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-all-bdbs-alerts) | `/v1/bdbs/alerts` | Get all alert states for all databases |\n| [GET](#get-bdbs-alerts) | `/v1/bdbs/alerts/{uid}` | Get all alert states for a specific database |\n| [GET](#get-bdbs-alert) | `/v1/bdbs/alerts/{uid}/{alert}` | Get a specific database alert state |\n| [POST](#post-bdbs-alerts) | `/v1/bdbs/alerts/{uid}` | Update a database’s alerts configuration |\n\n## Get all database alerts {#get-all-bdbs-alerts}\n\n\tGET /v1/bdbs/alerts\n\nGet all alert states for all databases.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [view_all_bdbs_alerts]() |\n\n### Request {#get-all-request} \n\n#### Example HTTP request\n\n\tGET /v1/bdbs/alerts \n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n### Response {#get-all-response}\n\nReturns a hash of alert UIDs and the [alerts]() states for each database.\n\n#### Example JSON body\n\n```json\n{\n    \"1\": {\n        \"bdb_size\": {\n            \"enabled\": true,\n            \"state\": true,\n            \"threshold\": \"80\",\n            \"change_time\": \"2014-08-29T11:19:49Z\",\n            \"severity\": \"WARNING\",\n            \"change_value\": {\n                \"state\": true,\n                \"threshold\": \"80\",\n                \"memory_util\": 81.2\n            }\n        },\n        \"...\"\n    },\n    \"...\"\n}\n```\n\n### Status codes {#get-all-status-codes} \n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |\n\n## Get database alerts {#get-bdbs-alerts}\n\n\tGET /v1/bdbs/alerts/{int: uid}\n\nGet all alert states for a database.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [view_bdb_alerts]() |\n\n### Request {#get-request-alerts} \n\n#### Example HTTP request\n\n\tGET /v1/bdbs/alerts/1 \n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n### Response {#get-response-alerts} \n\nReturns a hash of [alert objects]() and their states.\n\n#### Example JSON body\n\n```json\n{\n    \"bdb_size\": {\n        \"enabled\": true,\n        \"state\": true,\n        \"threshold\": \"80\",\n        \"severity\": \"WARNING\",\n        \"change_time\": \"2014-08-29T11:19:49Z\",\n        \"change_value\": {\n            \"state\": true,\n            \"threshold\": \"80\",\n            \"memory_util\": 81.2\n        }\n    },\n    \"...\"\n}\n```\n\n### Status codes {#get-status-codes-alerts} \n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified bdb does not exist |\n\n## Get database alert {#get-bdbs-alert}\n\n\tGET /v1/bdbs/alerts/{int: uid}/{alert}\n\nGet a database alert state.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [view_bdb_alerts]() |\n\n### Request {#get-request} \n\n#### Example HTTP request\n\n\tGET /v1/bdbs/alerts/1/bdb_size \n\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The unique ID of the database |\n| alert | string | The alert name |\n\n### Response {#get-response} \n\nReturns an [alert object]().\n\n#### Example JSON body\n\n```json\n{\n    \"enabled\": true,\n    \"state\": true,\n    \"threshold\": \"80\",\n    \"severity\": \"WARNING\",\n    \"change_time\": \"2014-08-29T11:19:49Z\",\n    \"change_value\": {\n        \"state\": true,\n        \"threshold\": \"80\",\n        \"memory_util\": 81.2\n    }\n}\n```\n\n### Status codes {#get-status-codes} \n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |\n| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad request |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified alert or bdb does not exist |\n\n## Update database alert {#post-bdbs-alerts}\n\n\tPOST /v1/bdbs/alerts/{int: uid}\n\nUpdates a database's alerts configuration.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [update_bdb_alerts]() |\n\n### Request {#post-request} \n\nIf passed with the dry_run URL query string, the function will validate the alert thresholds, but not commit them.\n\n#### Example HTTP request\n\n\tPOST /v1/bdbs/alerts/1 \n\n#### Example JSON body\n\n```json\n{\n     \"bdb_size\":{\n         \"threshold\":\"80\",\n         \"enabled\":true\n     },\n     \"bdb_high_syncer_lag\":{\n         \"threshold\":\"\",\n         \"enabled\":false\n     },\n     \"bdb_low_throughput\":{\n         \"threshold\":\"1\",\n         \"enabled\":true\n     },\n     \"bdb_high_latency\":{\n         \"threshold\":\"3000\",\n         \"enabled\":true\n     },\n     \"bdb_high_throughput\":{\n         \"threshold\":\"1\",\n         \"enabled\":true\n     },\n     \"bdb_backup_delayed\":{\n         \"threshold\":\"1800\",\n         \"enabled\":true\n     }\n}\n```\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | Database ID |\n| dry_run | string | Validate the alert thresholds but do not apply them |\n\n#### Request body\n\nThe request must contain a single JSON object with one or many database [alert objects]().\n\n### Response {#post-response} \n\nThe response includes the updated database [alerts]().\n\n### Status codes {#post-status-codes} \n\n| Code | Description |\n|------|-------------|\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified database was not found. |\n| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid configuration parameters provided. |\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, database alerts updated. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00"
}

