查看监控指标
功能介绍
查看监控指标,支持节点指标和图实例性能监控指标。
URI
GET /ges/v1.0/{project_id}/graphs/{graph_name}/om/metrics?real_time=&with_performance_metrics=
参数 | 是否必选 | 类型 | 说明 |
|---|---|---|---|
project_id | 是 | String | 项目ID,获取方法请参见获取项目ID。 |
graph_name | 是 | String | 图名称。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
real_time | 否 | Boolean | 是否查询实时监控指标,取值为true或者false, 默认为false。
|
with_performance_metrics | 否 | Boolean | 是否查询性能指标,会返回图实例性能指标和各个节点的指标。取值为true或者false,默认为true,如果设置为false,只返回节点的指标,响应时间会减少1-2秒。 |
请求参数
无
响应参数
参数 | 类型 | 说明 |
|---|---|---|
errorMessage | String | 系统提示信息。
|
errorCode | String | 系统提示信息。
|
project_id | String | schema结构查询结果。详情请参见表5-117。 |
id | String | 图ID。 |
name | String | 图名称。 |
timestamp | long | 当前时间戳。 |
node_metrics | Array of objects | 节点指标。 |
performance_metrics | Object | 性能指标。 |
参数 | 类型 | 说明 |
|---|---|---|
overview | String | 节点总览。 |
disk_details | Array of objects | 节点磁盘详情。 |
network_details | Array of objects | 节点网络详情。 |
参数 | 类型 | 说明 |
|---|---|---|
ges_instance_name | String | 节点名称。 |
instance_id | String | 节点ID。 |
work_ip | String | 节点ip。 |
role | String | 节点角色。 |
cpu_usage | Double | CPU使用率。 |
cpu_usage_usr | Double | CPU用户态使用率。 |
cpu_usage_sys | Double | CPU内核态使用率。 |
cpu_iowait | Double | CPU IO等待率。 |
cpu_idle | Double | CPU空闲率。 |
mem_total | Double | 内存总量,单位为GB。 |
mem_usage | Double | 内存使用量,单位为GB。 |
mem_free | Double | 内存可用量,单位为GB。 |
mem_cached | Double | 内存缓存量,单位为GB。 |
mem_buffer | Double | 内存缓冲量,单位为GB。 |
disk_total | Double | 磁盘总容量,单位为GB。 |
disk_usage_avg | Double | 磁盘平均使用率。 |
disk_used | Double | 磁盘使用量,单位为GB。 |
disk_available | Double | 可用磁盘总量,单位为GB。 |
disk_io_read | Double | 节点磁盘读速率,单位为KB/S。 |
disk_io_write | Double | 节点磁盘写速率,单位为KB/S。 |
disk_io | Double | 节点磁盘总读写速率。 |
swap_total | Double | 节点swap盘总量。 |
swap_free | Double | 节点swap盘剩余量。 |
network_io_rate | Double | 节点网络IO速率,单位为KB/S。 |
host_stat | String | 节点状态。 |
host_name | String | 节点名称。 |
参数 | 类型 | 说明 |
|---|---|---|
disk_name | String | 磁盘名称。 |
disk_type | String | 磁盘类型。 |
total | Double | 磁盘总量。 |
available | Double | 磁盘可用量。 |
used | Double | 磁盘使用量。 |
used_percentage | Double | 磁盘使用百分比。 |
svctm | Long | 磁盘IO服务时间,时间为ms。 |
await | Double | 磁盘IO等待时间,时间为ms。 |
util | Double | 磁盘IO使用率。 |
write_rate | Double | 磁盘读速率。 |
read_rate | Double | 磁盘写速率。 |
参数 | 类型 | 说明 |
|---|---|---|
status | Integer | 网卡状态。 |
interface_name | String | 网卡名称。 |
packets_recv | Long | 接受包个数。 |
packets_send | Long | 发送包个数。 |
packets_drop | Long | 丢弃包个数。 |
send_rate | Double | 发送速率,单位为KB/S。 |
recv_rate | Double | 接收速率,单位为KB/S。 |
参数 | 类型 | 说明 |
|---|---|---|
cpu_usage | Double | CPU使用率。 |
memory_usage | Double | 内存使用率。 |
disk_usage | Double | 磁盘平均使用率。 |
disk_io_rate | Double | 磁盘IO速率。 |
network_io_rate | Double | 网络IO速率。 |
swap_disk_usage | Double | Swap盘使用率。 |
tomcat_connections_usage | Double | tomcat连接数使用率。 |
qps | Long | 每秒请求个数。 |
vertex_number | Long | 点个数。 |
vertex_capacity | Long | 点容量。 |
vertex_usage | Double | 点使用率。 |
edge_number | Long | 边个数。 |
edge_capacity | Long | 边容量。 |
edge_usage | Double | 边使用率。 |
read_waiting_queue_length | Long | 读等待队列长度。 |
read_running_queue_length | Long | 读运行队列长度。 |
write_waiting_queue_length | Long | 写等待队列长度。 |
write_running_queue_length | Long | 写运行队列长度。 |
graph_name | String | 图实例名称。 |
jvm_heap_usage | Double | java堆内存使用率。 |
请求示例
GET http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/om/metrics?real_time=true 响应示例
状态码: 200
成功响应示例
{
"project_id": "xxx",
"id": "xxxxx",
"name": "baiwan_demo",
"timestamp": 1699506387592,
"node_metrics": [
{
"overview": {
"network_io_rate": 2.99,
"role": "slave",
"disk_io_write": 107.23,
"mem_cached": 2.57,
"cpu_usage_usr": 7.15,
"cpu_usage_sys": 3.07,
"disk_io_read": 3.03,
"ges_instance_name": "baiwan_demo-ges-cn-cn-2-1",
"disk_used": 5.48,
"swap_total": 0,
"mem_buffer": 192.5,
"disk_available": 144.47,
"cpu_iowait": 0.17,
"cpu_idle": 89.61,
"mem_total": 15.15,
"instance_id": "xxxxxxxx",
"mem_usage": 7.22,
"disk_total": 149.95,
"host_stat": 200,
"mem_free": 11.29,
"swap_free": 0,
"cpu_usage": 10.22,
"disk_usage_avg": 3.65,
"work_ip": "172.16.25.224",
"host_name": "baiwan_demo-ges-cn-cn-2-1"
},
"disk_details": [
{
"svctm": 0,
"total": 50,
"util": 0.61,
"write_rate": 96.48,
"disk_name": "vda",
"disk_type": "system",
"used_percentage": 0.09,
"available": 45.68,
"await": 18.16,
"read_rate": 2.99,
"used": 4.32
}
],
"network_details": [
{
"send_rate": 0.05,
"packets_drop": 0,
"packets_recv": 1001419,
"packets_send": 342518,
"interface_name": "eth0",
"recv_rate": 0.06,
"status": 1
}
]
}
],
"performance_metrics": {
"tomcat_connections_usage": 0,
"network_io_rate": 3.11,
"swap_disk_usage": 0,
"vertex_capacity": 1200000,
"memory_usage": 23.83,
"vertex_number": 1071803,
"jvm_heap_usage": 0.23,
"edge_capacity": 1200000,
"read_waiting_queue_length": 0,
"disk_io_rate": 0,
"qps": 0,
"write_running_queue_length": 0,
"write_waiting_queue_length": 0,
"disk_usage": 1.77,
"edge_number": 1200000,
"edge_usage": 100,
"cpu_usage": 9.23,
"read_running_queue_length": 0,
"vertex_usage": 89.32
}
} 状态码: 400
失败响应示例
Http Status Code: 400
{
"errorMessage": "Not found. Please check the input parameters.",
"errorCode": "GES.8000"
} 错误码
请参见错误码。

