Feature:在Dubbo-admin中新增监控功能
- Dominant language
- Go
- Stars
- 4.1k
- Forks
- 2.2k
- Avg merge
- 10d 12h
- Merged PRs (30d)
- 4
Description
- [x] I have searched the [issues](https://github.com/apache/dubbo-admin/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [REAMDE](https://github.com/apache/dubbo-admin/blob/develop/README.md) of this repository and believe that this is not a duplicate.
### Is your feature request related to a problem? Please describe.
### Describe the solution you'd like
参考 [spring-boot-admin](https://github.com/codecentric/spring-boot-admin),在dubbo-admin增加一些监控功能。
#### spring-boot-admin基本使用
1. 启动admin server(相同与启动dubbo admin)
2. 在需监控的应用中引入如下包
```xml
de.codecentric
spring-boot-admin-starter-client
org.springframework.boot
spring-boot-starter-actuator
```
3. 在具体的应用中,配置admin server的地址(Dubbo的好处是,我们有注册中心,就不需要用户手动配置admin地址了,无配置侵入)
```properties
# 当前项目端口号
server.port=8080
# Spring Boot Admin 监控服务器端地址
spring.boot.admin.client.url=http://localhost:9001
# 开启监控所有项
management.endpoints.web.exposure.include=*
```
4. 启动应用后,可以在admin控制台地址中查看监控面板
#### 应用总览

#### 实例监控面板

#### SpringBoot Admin支持的功能
- 启动时间、累计运行时间;
- 进程和线程数量和占用的 CPU 资源;
- 垃圾回收详情信息,回收次数和花费时间;
- JVM 线程转储、内存转储详情和对应的文件下载;
- 可以查看和配置 Spring Boot 项目中的日志级别;
- 查看 Spring Boot 项目性能监控;
- 查看 Spring Boot 运行环境信息;
- 查看 Spring Boot 所有类信息;
- 查看 Spring Boot 中的定时任务;
- 查看和管理 Spring Boot 项目中的所有缓存。
#### Dubbo Admin可以做什么
我目前设想的Dubbo Admin可以做的一些监控展示:
- 应用数量、实例展示、健康情况
- 启动时间、累计运行时间
- Dubbo Metrics相关的展示,例如:

像JVM、GC的一些通用指标,我认为优先级可以往后放。
Dubbo admin中集成基本监控的好处就是,不是所有公司都愿意运维Grafana+Prometheus,有些小团队可能原本就用的dubbo-admin,这时候如果内置基本的监控功能,他就不需要引入Grafana+Prometheus去享受Dubbo的Metrics特性。
#### Dubbo获取指标方式
每个服务内部暴漏一个dubbo服务类似元数据一样,admin先通过服务发现发现所有的的服务提供的指标服务,然后通过rpc调用获取,按照一定的周期去调用。
Dubbo在本地维持一个10min的窗口数据,不依赖db,通过RestFul接口暴露给前端,前端做一些图表展示。
### Describe alternatives you've considered
任务所需人员:
前端同学:@SDUWYS
后端同学:@conghuhu
### Additional context
Contributor guide
Research direction
Start with README.md and trace the existing admin service-discovery and metrics entry points. Review how Dubbo Metrics are exposed through RPC and how the frontend builds dashboards; done means an agreed scope is implemented for application, instance, health, and metrics views with verification of the monitoring flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, grafana, prometheus, spring-boot
- Domain
- backend, frontend, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100