robocanic opened a new issue, #310:
URL: https://github.com/apache/dubbo-kubernetes/issues/310

   # prometheus集成
   ## 大体思路
   后端提供接口,返回prometheus地址供前端查询
   前端查询时通过懒加载+定时轮询的方式异步刷新指标值
   ## 前端展示细节
   - 前端展示实例列表时,需要通过查询prometheus来获取实例使用的CPU,Memory
   
![image](https://github.com/apache/dubbo-kubernetes/assets/79916872/e8d1ba0d-d23e-4b12-9b3a-11429e04fb8f)
   
其中,实例的cpu使用量的查询promql为:`sum(rate(container_cpu_usage_seconds_total{pod="$POD_NAME"}[5m]))
 by (pod)`
   
实例的memory使用量的查询promql为:`sum(container_memory_usage_bytes{pod="$POD_NAME",container=""})
 by (pod)`
   - 前端展示服务列表时,需要通过查询prometheus来获取服务的QPS,RT,Request Total
   
![image](https://github.com/apache/dubbo-kubernetes/assets/79916872/aef292ce-e066-4bfa-b45c-519edc2f4f46)
   服务的QPS的查询promql为:`sum(dubbo_provider_qps_total{interface="$interface"})`
   
服务的RT的查询promql为:`avg(dubbo_consumer_rt_avg_milliseconds_aggregate{interface="$interface"}>0)`
   服务的Request 
Total的查询promql为:`sum(increase(dubbo_provider_requests_total{interface="$interface"}[1m]))`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to