Real-time monitoring of components under the application

Basic Information

This interface is mainly used to obtain the monitoring data of the component prometheus under an application

请求路径

  1. GET /openapi/v1/teams/{team_id}/regions/{region_name}/apps/{app_id}/monitor/query

request parameters

nameLocationtyperequiredChinese nameillustrate
app_idpathintegerYesapp id
team_idpathstringYesnone
region_namepathstringYesnone
is_outerquerystringnoWhether to get only external component monitoring

return result

status codeStatus code meaningillustratedata model
200OKsuccessInline

return data structure

nametyperequiredconstraintChinese nameillustrate
anonymous[ComponentMonitorSerializers]falsenonenone
» monitors[ComponentMonitorItemsSerializers]¦nullfalsenonenone
»» dataDatafalsenoneDatanone
»»» resultTypestringfalsenoneResulttypereturn type
»»» result[MonitorDataSerializers]truenonenone
»»»» value[string]truenonenone
»» monitor_itemstringtruenoneMonitor itemMonitoring item
»» statusstringfalsenoneStatusmonitor status
» service_idstringtruenoneService idcomponent id
» service_cnamestringtruenoneService cnamecomponent name
» service_aliasstringtruenoneService aliascomponent nickname

响应示例

  1. [
  2. {
  3. "monitors": [
  4. {
  5. "data": {
  6. "resultType": "vector",
  7. "result": [
  8. {
  9. "value": [
  10. "1655531430.126",
  11. "0"
  12. ]
  13. }
  14. ]
  15. },
  16. "monitor_item": "request_client",
  17. "status": "success"
  18. }
  19. ],
  20. "service_id": "8377bede3b344e3daa96563a55516625",
  21. "service_cname": "Mysql5.5 (single machine) )",
  22. "service_alias": "gr516625"
  23. }
  24. ]

Model

ComponentMonitorSerializers

  1. {
  2. "monitors": [
  3. {
  4. "data": {
  5. "resultType": "string",
  6. "result": [
  7. {
  8. "value": null
  9. }
  10. ]
  11. },
  12. "monitor_item": "string",
  13. "status": "string"
  14. }
  15. ],
  16. "service_id": "string",
  17. "service_cname": "string",
  18. "service_alias": "string"
  19. }

Attributes

nametyperequiredconstraintChinese nameillustrate
monitors[ComponentMonitorItemsSerializers]¦nullfalsenonenone
service_idstringtruenoneService idcomponent id
service_cnamestringtruenoneService cnamecomponent name
service_aliasstringtruenoneService aliascomponent nickname

ComponentMonitorItemsSerializers

  1. {
  2. "data": {
  3. "resultType": "string",
  4. "result": [
  5. {
  6. "value": [
  7. "string"
  8. ]
  9. }
  10. ]
  11. },
  12. "monitor_item": "string ",
  13. "status": "string"
  14. }

Attributes

nametyperequiredconstraintChinese nameillustrate
dataDatafalsenonenone
monitor_itemstringtruenoneMonitor itemMonitoring item
statusstringfalsenoneStatusmonitor status

Data

  1. {
  2. "resultType": "string",
  3. "result": [
  4. {
  5. "value": [
  6. "string"
  7. ]
  8. }
  9. ]
  10. }

Attributes

nametyperequiredconstraintChinese nameillustrate
resultTypestringfalsenoneResulttypereturn type
result[MonitorDataSerializers]truenonenone

MonitorDataSerializers

  1. {
  2. "value": [
  3. "string"
  4. ]
  5. }

Attributes

nametyperequiredconstraintChinese nameillustrate
value[string]truenonenone