cloud-security-wiki/docs/use/sentinel-dashboard/README.md

37 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# sentinel dashboard 限流模块
> sentinel dashboard可以通过页面图形化的方式监控机器以及服务的运行情况和配置复杂的各种流控、降级等规则以保证线上服务的稳定运行本篇文章主要是介绍控制台参数意义和使用规则达到快速使用的目的
## 具体实现
security cloud 有两个sentinel dashboard模块,一个是官方给的完整版,另外一个为集成了nacos持久化,适合生产环境使用
### 官方提供
- xml
```xml
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
```
- 添加yaml配置文件到client服务中
```yaml
spring:
cloud:
sentinel:
transport:
# sentinel dashboard服务地址
dashboard: localhost:5000
```
### nacos升级
- 配置数据持久化到nacos
- client注册到sentinel dashboard时,sentinel dashboard将nacos上对应的配置文件初始化给client
- 支持配置设置针对单一client设置配置文件还是集群内全部服务设置配置
> 配置与上方相同,只需要添加nacos的配置中心信息即可
![](./sentinel.png)