您好,登錄后才能下訂單哦!
小編給大家分享一下springcloud如何集成zipkin-server內(nèi)存日志監(jiān)控,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!
1. pom.xml 加入
<!--zipkin--> <dependency> <groupId>io.zipkin.java</groupId> <artifactId>zipkin-server</artifactId> <version>2.12.3</version> <exclusions> <exclusion> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-slf4j-impl</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>io.zipkin.java</groupId> <artifactId>zipkin-autoconfigure-ui</artifactId> <version>2.12.3</version> </dependency> <dependency> <groupId>io.zipkin.java</groupId> <artifactId>zipkin-autoconfigure-collector-kafka</artifactId> <version>2.12.9</version> </dependency> <dependency> <groupId>io.zipkin.java</groupId> <artifactId>zipkin-autoconfigure-storage-elasticsearch-http</artifactId> <version>2.8.4</version> </dependency> <!--www.1b23.com-->
2. application.properties 配置文件
spring.application.name=fhcloud-zipkin-serverserver.port=8003#開啟安全認(rèn)證 用戶名和密碼spring.security.basic.enabled=truespring.security.user.name=adminspring.security.user.password=root#指向注冊(cè)中心eureka.instance.leaseRenewalIntervalInSeconds=10eureka.client.registryFetchIntervalSeconds=5eureka.client.serviceUrl.defaultZone=http://127.0.0.1:8761/eureka/,http://127.0.0.1:8762/eureka/#actuator配置management.endpoints.web.exposure.include=*management.endpoints.web.exposure.exclude=env,beansmanagement.security.enabled=falsemanagement.metrics.web.server.auto-time-requests=fals
3. 啟動(dòng)類 FHmainApplication.java
package org.fh;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.cloud.netflix.eureka.EnableEurekaClient;import zipkin2.server.internal.EnableZipkinServer;/** * 說明:啟動(dòng)類 * www.1b23.com */@SpringBootApplication@EnableEurekaClient@EnableZipkinServerpublic class FHmainApplication { public static void main(String[] args) { SpringApplication.run(FHmainApplication.class, args); } }
以上是“springcloud如何集成zipkin-server內(nèi)存日志監(jiān)控”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。