Method | Path | Description |
---|
GET | /v1/bdbs/alerts | Get all alert states for all databases |
GET | /v1/bdbs/alerts/{uid} | Get all alert states for a specific database |
GET | /v1/bdbs/alerts/{uid}/{alert} | Get a specific database alert state |
POST | /v1/bdbs/alerts/{uid} | Update a database’s alerts configuration |
Get all database alerts
GET /v1/bdbs/alerts
Get all alert states for all databases.
Required permissions
Request
Example HTTP request
GET /bdbs/alerts
Key | Value | Description |
---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
Response
Returns a hash of alert UIDs and the alerts states for each database.
Example JSON body
{
"1": {
"bdb_size": {
"enabled": true,
"state": true,
"threshold": "80",
"change_time": "2014-08-29T11:19:49Z",
"severity": "WARNING",
"change_value": {
"state": true,
"threshold": "80",
"memory_util": 81.2
}
},
"..."
},
"..."
}
Status codes
Get database alerts
GET /v1/bdbs/alerts/{int: uid}
Get all alert states for a database.
Required permissions
Request
Example HTTP request
GET /bdbs/alerts/1
Key | Value | Description |
---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
Response
Returns a hash of alert objects and their states.
Example JSON body
{
"bdb_size": {
"enabled": true,
"state": true,
"threshold": "80",
"severity": "WARNING",
"change_time": "2014-08-29T11:19:49Z",
"change_value": {
"state": true,
"threshold": "80",
"memory_util": 81.2
}
},
"..."
}
Status codes
Get database alert
GET /v1/bdbs/alerts/{int: uid}/{alert}
Get a database alert state.
Required permissions
Request
Example HTTP request
GET /bdbs/alerts/1/bdb_size
Key | Value | Description |
---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
URL parameters
Field | Type | Description |
---|
uid | integer | The unique ID of the database |
alert | string | The alert name |
Response
Returns an alert object.
Example JSON body
{
"enabled": true,
"state": true,
"threshold": "80",
"severity": "WARNING",
"change_time": "2014-08-29T11:19:49Z",
"change_value": {
"state": true,
"threshold": "80",
"memory_util": 81.2
}
}
Status codes
Update database alert
POST /v1/bdbs/alerts/{int: uid}
Updates a database’s alerts configuration.
Required permissions
Request
If passed with the dry_run URL query string, the function will validate the alert thresholds, but not commit them.
Example HTTP request
POST /bdbs/alerts/1
Example JSON body
{
"bdb_size":{
"threshold":"80",
"enabled":true
},
"bdb_high_syncer_lag":{
"threshold":"",
"enabled":false
},
"bdb_low_throughput":{
"threshold":"1",
"enabled":true
},
"bdb_high_latency":{
"threshold":"3000",
"enabled":true
},
"bdb_high_throughput":{
"threshold":"1",
"enabled":true
},
"bdb_backup_delayed":{
"threshold":"1800",
"enabled":true
}
}
Key | Value | Description |
---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
URL parameters
Field | Type | Description |
---|
uid | integer | Database ID |
dry_run | string | Validate the alert thresholds but do not apply them |
Request body
The request must contain a single JSON object with one or many database alert objects.
Response
The response includes the updated database alerts.
Status codes