云服务器内容精选

  • URI GET /ges/v1.0/{project_id}/graphs/{graph_name}/om/metrics?real_time=&with_performance_metrics= 表1 路径参数 参数 是否必选 类型 说明 project_id 是 String 项目ID,获取方法请参见获取项目ID。 graph_name 是 String 图名称。 real_time 否 Boolean 是否查询实时监控指标,取值为true或者false,默认为false。 false:会查询图实例2分钟内的指标。 true:会查询实时监控指标,请求响应在3-5秒之间。 with_performance_metrics 否 Boolean 是否查询性能指标,会返回图实例性能指标和各个节点的指标。取值为true或者false,默认为true,如果设置为true,只返回节点的指标,响应时间会减少1-2秒。
  • 响应示例 状态码: 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": "query metrics error.", "errorCode": "GES.8602" }