节点警报请求
节点警报请求
Redis 企业软件 |
---|
方法 | 路径 | 描述 |
---|---|---|
获取 | /v1/nodes/alerts |
获取所有节点的所有警报状态 |
获取 | /v1/nodes/alerts/{uid} |
获取节点的所有警报状态 |
获取 | /v1/nodes/alerts/{uid}/{alert} |
获取节点警报状态 |
获取所有警报状态
GET /v1/nodes/alerts
获取所有节点的所有警报状态。
所需权限
权限名称 |
---|
view_all_nodes_alerts |
请求
HTTP 请求示例
GET /v1/nodes/alerts
请求标头
钥匙 | 价值 | 描述 |
---|---|---|
主机 | cnm.cluster.fqdn 中 | 域名 |
接受 | 应用程序/JSON | 接受的媒体类型 |
查询参数
田 | 类型 | 描述 |
---|---|---|
ignore_settings | 布尔 | 检索更新的警报状态,而不管集群的alert_settings如何。如果不存在,则禁用的警报将始终检索为禁用,并显示 false 状态。(可选) |
响应
返回节点 UID 的哈希值和每个节点的警报状态。
示例 JSON 正文
{
"1": {
"node_cpu_utilization": {
"change_time": "2014-12-22T10:42:00Z",
"change_value": {
"cpu_util": 2.500000000145519,
"global_threshold": "1",
"state": true
},
"enabled": true,
"state": true,
"severity": "WARNING"
},
"..."
},
"..."
}
Status codes
Code
Description
200 OK
No error
Get node alert states
GET /v1/nodes/alerts/{int: uid}
Get all alert states for a node.
Required permissions
Permission name
view_node_alerts
Request
Example HTTP request
GET /v1/nodes/alerts/1
Request headers
Key
Value
Description
Host
cnm.cluster.fqdn
Domain name
Accept
application/json
Accepted media type
Query parameters
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)
Response
Returns a hash of alert objects and their states for a specific node.
Example JSON body
{
"node_cpu_utilization": {
"change_time": "2014-12-22T10:42:00Z",
"change_value": {
"cpu_util": 2.500000000145519,
"global_threshold": "1",
"state": true
},
"enabled": true,
"state": true,
"severity": "WARNING",
},
"..."
}
Status codes
Code
Description
200 OK
No error
404 Not Found
Specified node does not exist
Get node alert state
GET /v1/nodes/alerts/{int: uid}/{alert}
Get a node alert state.
Required permissions
Permission name
view_node_alerts
Request
Example HTTP request
GET /v1/nodes/alerts/1/node_cpu_utilization
Request headers
Key
Value
Description
Host
cnm.cluster.fqdn
Domain name
Accept
application/json
Accepted media type
Query parameters
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)
Response
Returns an alert object.
Example JSON body
{
"change_time": "2014-12-22T10:42:00Z",
"change_value": {
"cpu_util": 2.500000000145519,
"global_threshold": "1",
"state": true
},
"enabled": true,
"state": true,
"severity": "WARNING",
}
Status codes
Code
Description
200 OK
No error
404 Not Found
Specified alert or node does not exist
On this page