集成spring-boot-admin
This commit is contained in:
parent
892f87018c
commit
1606dcd85b
|
@ -0,0 +1,35 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<groupId>net.maku</groupId>
|
||||||
|
<artifactId>maku-boot-module</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>maku-module-monitor</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.maku</groupId>
|
||||||
|
<artifactId>maku-framework</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.codecentric</groupId>
|
||||||
|
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||||
|
<version>2.7.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.codecentric</groupId>
|
||||||
|
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||||
|
<version>2.7.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.oshi</groupId>
|
||||||
|
<artifactId>oshi-core</artifactId>
|
||||||
|
<version>6.3.2</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,10 @@
|
||||||
|
package net.maku.monitor.config;
|
||||||
|
|
||||||
|
import de.codecentric.boot.admin.server.config.EnableAdminServer;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration(proxyBeanMethods = false)
|
||||||
|
@EnableAdminServer
|
||||||
|
public class AdminServerConfiguration {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
auth:
|
||||||
|
ignore_urls:
|
||||||
|
- /monitor/admin/**
|
|
@ -30,3 +30,26 @@ spring:
|
||||||
max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认: 30 分钟
|
max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认: 30 分钟
|
||||||
connection-test-query: SELECT 1
|
connection-test-query: SELECT 1
|
||||||
pool-name: MakuHikariCP
|
pool-name: MakuHikariCP
|
||||||
|
|
||||||
|
|
||||||
|
--- ############ 监控相关配置
|
||||||
|
|
||||||
|
# Actuator 配置
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
base-path: /actuator
|
||||||
|
exposure:
|
||||||
|
include: '*'
|
||||||
|
|
||||||
|
# Spring Boot Admin 配置
|
||||||
|
spring:
|
||||||
|
boot:
|
||||||
|
admin:
|
||||||
|
# Spring Boot Admin Server 服务端地址
|
||||||
|
context-path: /monitor/admin
|
||||||
|
client:
|
||||||
|
# 指定 Spring Boot Admin Server 服务端地址
|
||||||
|
url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path}
|
||||||
|
instance:
|
||||||
|
service-host-type: IP
|
|
@ -20,3 +20,26 @@ spring:
|
||||||
max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认: 30 分钟
|
max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认: 30 分钟
|
||||||
connection-test-query: SELECT 1
|
connection-test-query: SELECT 1
|
||||||
pool-name: MakuHikariCP
|
pool-name: MakuHikariCP
|
||||||
|
|
||||||
|
|
||||||
|
--- ############ 监控相关配置
|
||||||
|
|
||||||
|
# Actuator 配置
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
base-path: /actuator
|
||||||
|
exposure:
|
||||||
|
include: '*'
|
||||||
|
|
||||||
|
# Spring Boot Admin 配置
|
||||||
|
spring:
|
||||||
|
boot:
|
||||||
|
admin:
|
||||||
|
# Spring Boot Admin Server 服务端地址
|
||||||
|
context-path: /monitor/admin
|
||||||
|
client:
|
||||||
|
# 指定 Spring Boot Admin Server 服务端地址
|
||||||
|
url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path}
|
||||||
|
instance:
|
||||||
|
service-host-type: IP
|
|
@ -20,3 +20,26 @@ spring:
|
||||||
max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认: 30 分钟
|
max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认: 30 分钟
|
||||||
connection-test-query: SELECT 1
|
connection-test-query: SELECT 1
|
||||||
pool-name: MakuHikariCP
|
pool-name: MakuHikariCP
|
||||||
|
|
||||||
|
|
||||||
|
--- ############ 监控相关配置
|
||||||
|
|
||||||
|
# Actuator 配置
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
base-path: /actuator
|
||||||
|
exposure:
|
||||||
|
include: '*'
|
||||||
|
|
||||||
|
# Spring Boot Admin 配置
|
||||||
|
spring:
|
||||||
|
boot:
|
||||||
|
admin:
|
||||||
|
# Spring Boot Admin Server 服务端地址
|
||||||
|
context-path: /monitor/admin
|
||||||
|
client:
|
||||||
|
# 指定 Spring Boot Admin Server 服务端地址
|
||||||
|
url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path}
|
||||||
|
instance:
|
||||||
|
service-host-type: IP
|
Loading…
Reference in New Issue
Block a user