服务热线
135-6963-3175
sentinel我们采用的最新版本1.8.4版本,
1、启动sentinel
首先启动
java -Dserver.port=8080 -jar sentinel-dashboard-1.6.3.jar
若启动时带这两个-Dcsp.sentinel.dashboard.server=localhost:8080 -Dproject.name=sentinel-dashboard参数会把dashboard自身加入sentinel管理控制台。
2、集成springboot
pom.xml加入依赖
#版本
<spring-cloud.version>Finchley.SR1</spring-cloud.version>
#依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
#依赖管理
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>0.2.2.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>配置文件:
spring: application: name: 1json.com cloud: sentinel: transport: dashboard: localhost:8080
启动后访问一个路径。
并登录sentinel http://localhost:8080/#/dashboard/home
可查看到已经显示项目名称和访问过的路径。
其中目录:
实时监控:实时监控接口通过Qps\拒绝qps\rt响应时间
流控规则:会列出设置过的流控并可在该类目做修改新增
降级规则:同上
热点规则:同上
系统规则:可设置load负载、rt响应时间、线程数、入口qps、cpu使用率阀值。
授权规则:可针对资源授权流控应用(黑白名单)。
集群流控:可新增token Server
机器列表:显示当前被管理的机器实例列表和健康状态。
实时监控如下图:

簇点链路:会列出所有访问过的资源,并可在后面进行流控规则、熔断规则、热点规则、授权规则的添加和设置。

流控:
非集群模式:

集群模式:

熔断:

热点:

流控规则栏目:

降级规则栏目:

热点规则栏目:

系统规则:

授权规则:

集群流控:
应用外机器

应用内机器

client列表

机器列表
