【springboot2.0】arthas tunnel server监控配置方法

arthas配置方法:

1.增加pom,增加配置文件application.yml里面内容:

pom.xml:

<dependency>
	        <groupId>com.taobao.arthas</groupId>
	        <artifactId>arthas-spring-boot-starter</artifactId>
	        <version>3.6.7</version>
</dependency>

application.yml:

arthas:
  #arthas服务端域名
  tunnel-server: ws://xx.xx.xx.xx:8777/ws
  #客户端id,应用名_随机值,js会截取前面的应用名
  agent-id: MyTest_${random.value}

2.下载arthas tunnel server fat jar包

github:https://github.com/alibaba/arthas/releases
文档:https://arthas.aliyun.com/doc/tunnel.html

1.修改配置文件

使用winrar打开,修改内部的arthas-tunnel-server-3.6.7-fatjar.jar\BOOT-INF\classes\application.properties:

# arthas tunnel server host
arthas.server.host=0.0.0.0
# arthas tunnel server port
arthas.server.port=8777

server.port=8081
# for all endpoints
management.endpoints.web.exposure.include=*

# default user name
spring.security.user.name=arthas

# If set to true, be sure to do security protection to ensure that the server will not be illegally accessed
arthas.enable-detail-pages=true

spring.cache.type=caffeine
spring.cache.cache-names=inMemoryClusterCache
spring.cache.caffeine.spec=maximumSize=3000,expireAfterAccess=3600s

#arthas.embedded-redis.enabled=true
#arthas.embedded-redis.settings=maxmemory 128M
#spring.redis.host=127.0.0.1

---------------以上为修改好的配置文件所有内容,主要修改以下三行

arthas.enable-detail-pages=true
arthas.server.port=8777
server.port=8081

2.修改前台文件:

arthas-tunnel-server-3.6.7-fatjar.jar\BOOT-INF\classes\static\static\js\tunnel-0391fa5f.js
将里面的7777修改为8777

3.启动两个项目即可

http://xxx.xx.xx.x:8081/apps.html

执行命令相关文档和资料:
https://arthas.aliyun.com/doc/quick-start.html#_6-watch
https://developer.aliyun.com/article/1009026

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值