查詢Postgresql實例性能數據
更新時間 2022-11-28 22:36:11
最近更新時間: 2022-11-28 22:36:11
分享文章
接口描述
查詢Postgresql實例性能數據。
請求方法
GET
URI
/v1/monitor/performance
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| prodInstId | query | Long | 是 | 實例id |
| startTime | query | String | 是 | 自定義查詢開始時間 |
| endTime | query | String | 是 | 自定義查詢結束時間 |
響應參數
| 名稱 | 二級節點 | 三級節點 | 四級節點 | 類型 | 說明 |
|---|---|---|---|---|---|
| message | String | 消息提示 | |||
| statusCode | Integer | 狀態碼 | |||
| returnObj | Object | ||||
| instId | Long | 實例id | |||
| nodes | List | 實例各個節點性能信息 | |||
| ip | String | 節點ip | |||
| master | boolean | 是否主節點 | |||
| metrics | List | 時間范圍類各個時間點性能指標 | |||
| cpuUser | Byte | 監控數據采集時間間隔內,cpu處于用戶態的時間比例,單位% | |||
| cpuSys | Byte | 監控數據采集時間間隔內,cpu處于內核態的時間比例,單位% | |||
| rRateKbs | BigDecimal | io讀速率,單位kb/s | |||
| wRateKbs | BigDecimal | io寫速率,單位kb/s | |||
| ioUtil | BigDecimal | io利用率,單位% | |||
| qps | Integer | 節點qps | |||
| tps | Integer | 節點tps | |||
| collectTime | String | 數據采集時間 |
示例
請求示例
/v1/monitor/getPerformance?prodInstId=14&startTime='2022-08-19 00:00:00'&endTime='2022-08-20 23:59:00'
響應示例
{
"message": "SUCCESS",
"opMessage": "",
"returnObj": {
"instId": 14,
"nodes": [
{
"ip": "192.168.190.11",
"master": false,
"metrics": [
{
"collectTime": "2022-08-20 15:54:48",
"cpuSys": 3,
"cpuUser": 1,
"ioUtil": 0.1,
"qps": 0,
"rRateKbs": 6.2,
"tps": 0,
"wRateKbs": 74.5
},
{
"collectTime": "2022-08-20 15:54:48",
"cpuSys": 3,
"cpuUser": 1,
"ioUtil": 0.1,
"qps": 0,
"rRateKbs": 6.2,
"tps": 0,
"wRateKbs": 74.5
}
]
},
{
"ip": "192.168.190.12",
"master": true,
"metrics": []
}
]
},
"statusCode": 800
}
錯誤碼
訪問ErrorCodes說明文檔查看更多錯誤碼。