摘要:簡介用于監(jiān)控基于的應(yīng)用,它是在的基礎(chǔ)上提供簡潔的可視化。提供了很多功能,如顯示和,顯示在線狀態(tài),的日志級別管理,線程管理,管理等。
Spring Cloud Admin
簡介
Spring Boot Admin 用于監(jiān)控基于 Spring Boot 的應(yīng)用,它是在 Spring Boot Actuator 的基礎(chǔ)上提供簡潔的可視化 WEB UI。Spring Boot Admin 提供了很多功能,如顯示 name、id 和 version,顯示在線狀態(tài),Loggers 的日志級別管理,Threads 線程管理,Environment 管理等。
基于Cairo-SR3 和 Finchley.SR1
在 Spring Boot 項目中,Spring Boot Admin 作為 Server 端,其他的要被監(jiān)控的應(yīng)用作為 Client 端,基于這種的配置如下步驟:
admin-server
@EnableAdminServer @EnableEurekaClient @SpringBootApplication public class AdminServerApplication { public static void main(String[] args) { SpringApplication.run(AdminServerApplication.class, args); } }
application.yml:
server: port: 5000 spring: application: name: admin-server eureka: client: service-url: defaultZone: ${EUREKA_SERVICE_URL:http://localhost:8761}/eureka/
pom:
io.spring.platform platform-bom Cairo-SR3 pom import org.springframework.cloud spring-cloud-dependencies Finchley.SR1 pom import org.springframework.cloud spring-cloud-starter-netflix-eureka-client de.codecentric spring-boot-admin-starter-server 2.0.1 org.springframework.boot spring-boot-maven-plugin org.apache.maven.plugins maven-compiler-plugin 1.8 UTF-8
admin-clent
@EnableDiscoveryClient @SpringBootApplication public class AdminClientApplication { public static void main(String[] args) { SpringApplication.run(AdminClientApplication.class, args); } }
application.yml
server: port: 8762 eureka: client: serviceUrl: defaultZone: http://localhost:8761/eureka/ spring: application: name: admin-client management: endpoints: web: exposure: include: "*" endpoint: health: show-details: always
pom:
io.spring.platform platform-bom Cairo-SR3 pom import org.springframework.cloud spring-cloud-dependencies Finchley.SR1 pom import org.springframework.boot spring-boot-starter-web org.springframework.cloud spring-cloud-starter-netflix-eureka-client de.codecentric spring-boot-admin-starter-client 2.0.1 org.springframework.boot spring-boot-starter-actuator org.apache.maven.plugins maven-compiler-plugin 1.8 UTF-8
eureka
@EnableEurekaServer @SpringBootApplication public class EurekaApplication { public static void main(String[] args) { SpringApplication.run(EurekaApplication.class, args); } @EnableWebSecurity static class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable(); } } }
application.yml
server: port: 8761 eureka: client: serviceUrl: defaultZone: http://localhost:8761/eureka
pom:
io.spring.platform platform-bom Cairo-SR3 pom import org.springframework.cloud spring-cloud-dependencies Finchley.SR1 pom import org.springframework.cloud spring-cloud-starter-netflix-eureka-server org.springframework.boot spring-boot-starter-security org.springframework.boot spring-boot-starter-actuator
先啟動eureka然后接著啟動admin-client 和 admin-server 在瀏覽器打開url
github:https://github.com/janlle
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://systransis.cn/yun/74261.html
摘要:服務(wù)器將要監(jiān)聽的端口不要使用服務(wù)進行注冊不要在本地緩存注冊表信息使用一個新的注解,就可以讓我們的服務(wù)成為一個服務(wù)服務(wù)發(fā)現(xiàn)客戶端配置以為例需要做件事情成為服務(wù)發(fā)現(xiàn)的客戶端配置對應(yīng)來說我們只需要配置如下啟動運行查看。 Spring簡介 為什么要使用微服務(wù) 單體應(yīng)用: 目前為止絕大部分的web應(yīng)用軟件采用單體應(yīng)用,所有的應(yīng)用的用戶UI、業(yè)務(wù)邏輯、數(shù)據(jù)庫訪問都打包在一個應(yīng)用程序上。 showI...
摘要:概述在我之前的應(yīng)用監(jiān)控實戰(zhàn)一文中,講述了如何利用版本來可視化地監(jiān)控應(yīng)用。接下來我們就來創(chuàng)建一個待監(jiān)控的示例。 showImg(https://segmentfault.com/img/remote/1460000015671446); 概述 在我之前的 《Spring Boot應(yīng)用監(jiān)控實戰(zhàn)》 一文中,講述了如何利用 Spring Boot Admin 1.5.X 版本來可視化地監(jiān)控 ...
摘要:并向注冊中心注冊,注冊地址為,最后將的所有端口暴露出來,配置如下在工程的啟動類加上注解,開啟的功能,加上注解開啟的功能。在啟動類加上注解,開啟的功能。 轉(zhuǎn)載請標(biāo)明出處: https://www.fangzhipeng.com本文出自方志朋的博客 Spring Boot Admin簡介 Spring Boot Admin是一個開源社區(qū)項目,用于管理和監(jiān)控SpringBoot應(yīng)用程序。 ...
閱讀 1626·2023-04-26 02:43
閱讀 3052·2021-11-11 16:54
閱讀 1366·2021-09-23 11:54
閱讀 1186·2021-09-23 11:22
閱讀 2379·2021-08-23 09:45
閱讀 859·2019-08-30 15:54
閱讀 3109·2019-08-30 15:53
閱讀 3198·2019-08-30 15:53