当前位置:网站首页>Sentinel安装与部署
Sentinel安装与部署
2022-07-31 14:05:00 【Leon_Jinhai_Sun】
和Nacos一样,它是独立安装和部署的,下载地址:Releases · alibaba/Sentinel · GitHub
注意下载下来之后是一个jar文件(其实就是个SpringBoot项目),我们需要在IDEA中添加一些运行配置:

接着就可以直接启动啦,当然默认端口占用8080,如果需要修改,可以添加环境变量:

启动之后,就可以访问到Sentinel的监控页面了,用户名和密码都是sentinel,地址:http://localhost:8858/#/dashboard

这样就成功开启监控页面了,接着我们需要让我们的服务连接到Sentinel控制台,老规矩,导入依赖:
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>然后在配置文件中添加Sentinel相关信息(实际上Sentinel是本地在进行管理,但是我们可以连接到监控页面,这样就可以图形化操作了):
spring:
application:
name: userservice
cloud:
nacos:
discovery:
server-addr: localhost:8848
sentinel:
transport:
# 添加监控页面地址即可
dashboard: localhost:8858现在启动我们的服务,然后访问一次服务,这样Sentinel中就会存在信息了(懒加载机制,不会一上来就加载):

现在我们就可以在Sentinel控制台中对我们的服务运行情况进行实时监控了,可以看到监控的内容非常的多,包括时间点、QPS(每秒查询率)、响应时间等数据。
按照上面的方式,我们将所有的服务全部连接到Sentinel管理面板中。
边栏推荐
- 推荐系统-召回阶段-2013:DSSM(双塔模型)【Embedding(语义向量)召回】【微软】
- Shell project combat 1. System performance analysis
- Usage of += in C#
- [QNX Hypervisor 2.2用户手册]9.13 rom
- 【Pytorch】torch.argmax()用法
- Spark Learning: Add Custom Optimization Rules for Spark Sql
- VU 非父子组件通信
- The magic of SQL MERGE statement (detailed instructions)
- Shell脚本经典案例:探测批量主机是否存活
- OAuth2:搭建授权服务器
猜你喜欢

IDEA连接MySQL数据库并使用数据

Redis与分布式:集群搭建

OAuth2:四种授权方式

Small test knife: Go reflection helped me convert Excel to Struct

For enterprises in the digital age, data governance is difficult, but it should be done

Samba 远程命令执行漏洞(CVE-2017-7494)

Asynchronous processing business using CompletableFuture

Even if the image is missing in a large area, it can also be repaired realistically. The new model CM-GAN takes into account the global structure and texture details

The pre-sale of the new Hyundai Paristi is open, and safety and comfort are not lost

Node version switching management using NVM
随机推荐
ML, DL, CV common problems sorting
Asynchronous processing business using CompletableFuture
五个维度着手MySQL的优化
In the future, the interviewer asks you why it is not recommended to use Select *, please answer him out loud!
Sentinel服务熔断和降级
「面经分享」西北大学 | 字节 生活服务 | 一面二面三面 HR 面
SetoolKit使用指南
CodeIgniter 打开错误日志
Node version switching management using NVM
线程池的使用二
Reasons and solutions for Invalid bound statement (not found)
常用工具命令速查表
[QNX Hypervisor 2.2 User Manual] 9.13 rom
232层3D闪存芯片来了:单片容量2TB,传输速度提高50%
OAuth2:微服务权限校验Session共享
MySQL【子查询】
redhat/openssl生成自签ca证书并使用
Motion capture system for end-positioning control of flexible manipulators
小试牛刀:Go 反射帮我把 Excel 转成 Struct
MySQL玩到这种程度,难怪大厂抢着要!