skywalking配置和使⽤(windows)
先总结IDEA整合skywalking
⼀,下载
mysql下载libs包的网址⼆,修改启动端⼝
修改D:\apache-skywalking-apm-bin\l
主要修改port: 18080
server:
port: 18080
collector:
path: /graphql
ribbon:
ReadTimeout: 10000
# Point to all backend's restHost:restPort, split by ,
listOfServers: 127.0.0.1:12800
三,更改数据库为mysql
1 下载mysql-connector-java-5.1.46.jar到oap-libs下
只要是mysql-connector-java-5的版本就可以。
2 打开D:\apache-skywalking-apm-bin\l
注释H2,开启mysql
# h2:
# driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource}
# url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db}
# user: ${SW_STORAGE_H2_USER:sa}
# metadataQueryMaxSize: ${SW_STORAGE_H2_QUERY_MAX_SIZE:5000}
mysql:
properties:
jdbcUrl: ${SW_JDBC_URL:"jdbc:mysql://localhost:3306/swtest"}
dataSource.user: ${SW_DATA_SOURCE_USER:root}
dataSource.password: ${SW_DATA_SOURCE_PASSWORD:root}
dataSource.cachePrepStmts: ${SW_DATA_SOURCE_CACHE_PREP_STMTS:true}
dataSource.prepStmtCacheSize: ${SW_DATA_SOURCE_PREP_STMT_CACHE_SQL_SIZE:250}
dataSource.prepStmtCacheSqlLimit: ${SW_DATA_SOURCE_PREP_STMT_CACHE_SQL_LIMIT:2048}
dataSource.useServerPrepStmts: ${SW_DATA_SOURCE_USE_SERVER_PREP_STMTS:true}
dataSource.useSSL: false
metadataQueryMaxSize: ${SW_STORAGE_MYSQL_QUERY_MAX_SIZE:5000}
3 接着,到Mysql中创建⼀个 swtest数据库。
四,修改IDEA的配置
-javaagent:D:/apache-skywalking-apm-bin/agent/skywalking-agent.jar
-llector.backend_service=localhost:11800
五,启动
1 先开启微服务(注册中⼼,配置中⼼,zuul,个别服务)
2 启动 D:\apache-skywalking-apm-bin\bin\startup.bat
PS:学会看⽇志很重要
D:\apache-skywalking-apm-bin\logs\skywalking-oap-server.log
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论