diff --git a/ruoyi-extend/ruoyi-powerjob-server/pom.xml b/ruoyi-extend/ruoyi-powerjob-server/pom.xml index f771ae97..0a9ce708 100644 --- a/ruoyi-extend/ruoyi-powerjob-server/pom.xml +++ b/ruoyi-extend/ruoyi-powerjob-server/pom.xml @@ -11,6 +11,7 @@ 2.7.12 + 2.7.10 @@ -33,6 +34,12 @@ ${powerjob.version} + + de.codecentric + spring-boot-admin-starter-client + ${spring-boot-admin.version} + + org.projectlombok lombok diff --git a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application-dev.properties b/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application-dev.properties index b3e342e1..36dbdfc6 100644 --- a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application-dev.properties +++ b/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application-dev.properties @@ -8,9 +8,18 @@ spring.datasource.core.password=root spring.datasource.core.maximum-pool-size=20 spring.datasource.core.minimum-idle=5 +# 监控配置 +# 客户端开关 +spring.boot.admin.client.enabled=true +# 设置 Spring Boot Admin Server 地址 +spring.boot.admin.client.url: http://localhost:9090/admin +spring.boot.admin.client.instance.service-host-type=IP +spring.boot.admin.client.username=ruoyi +spring.boot.admin.client.password=123456 + ####### MongoDB properties(Non-core configuration properties) ####### ####### delete mongodb config to disable mongodb ####### -#oms.mongodb.enable=true +oms.mongodb.enable=false #spring.data.mongodb.uri=mongodb+srv://zqq:No1Bug2Please3!@cluster0.wie54.gcp.mongodb.net/powerjob_daily?retryWrites=true&w=majority ####### Email properties(Non-core configuration properties) ####### diff --git a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application-prod.properties b/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application-prod.properties index 6316e30e..e6a6052c 100644 --- a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application-prod.properties +++ b/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application-prod.properties @@ -8,9 +8,18 @@ spring.datasource.core.password=root spring.datasource.core.maximum-pool-size=20 spring.datasource.core.minimum-idle=5 +# 监控配置 +# 客户端开关 +spring.boot.admin.client.enabled=true +# 设置 Spring Boot Admin Server 地址 +spring.boot.admin.client.url: http://localhost:9090/admin +spring.boot.admin.client.instance.service-host-type=IP +spring.boot.admin.client.username=ruoyi +spring.boot.admin.client.password=123456 + ####### MongoDB properties(Non-core configuration properties) ####### ####### delete mongodb config to disable mongodb ####### -#oms.mongodb.enable=true +oms.mongodb.enable=false #spring.data.mongodb.uri=mongodb+srv://zqq:No1Bug2Please3!@cluster0.wie54.gcp.mongodb.net/powerjob_daily?retryWrites=true&w=majority ####### Email properties(Non-core configuration properties) ####### diff --git a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application.properties b/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application.properties index 70284995..5477c1fe 100644 --- a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application.properties +++ b/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/application.properties @@ -21,3 +21,10 @@ oms.akka.port=10086 oms.http.port=10010 # Prefix for all tables. Default empty string. Config if you have needs, i.e. pj_ oms.table-prefix=pj_ + +# Actuator 监控端点的配置项 +spring.application.name: ruoyi-powerjob-server +management.endpoints.web.exposure.include=* +management.endpoint.health.show-details=ALWAYS +management.endpoint.logfile.external-file=./logs/ruoyi-powerjob-server.log +management.health.mongo.enabled=${oms.mongodb.enable} diff --git a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/logback-config/powerjob_monitor.xml b/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/logback-config/powerjob_monitor.xml deleted file mode 100644 index d357a833..00000000 --- a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/logback-config/powerjob_monitor.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - ${MONITOR_LOG_PATH}/database.log - - ${MONITOR_LOG_PATTERN} - UTF-8 - - - ${MONITOR_LOG_PATH}/database.log.${ROTATE_PATTERN} - 3 - 200MB - 1000MB - - - - 512 - 0 - true - - - - - - - - - - ${MONITOR_LOG_PATH}/tt_status_report.log - - ${MONITOR_LOG_PATTERN} - UTF-8 - - - ${MONITOR_LOG_PATH}/tt_status_report.log.${ROTATE_PATTERN} - 3 - 200MB - 1000MB - - - - 512 - 0 - true - - - - - - - - - ${MONITOR_LOG_PATH}/worker_heartbeat.log - - ${MONITOR_LOG_PATTERN} - UTF-8 - - - ${MONITOR_LOG_PATH}/worker_heartbeat.log.${ROTATE_PATTERN} - 3 - 200MB - 1000MB - - - - 512 - 0 - true - - - - - - - - - - ${MONITOR_LOG_PATH}/worker_log_report.log - - ${MONITOR_LOG_PATTERN} - UTF-8 - - - ${MONITOR_LOG_PATH}/worker_log_report.log.${ROTATE_PATTERN} - 3 - 200MB - 1000MB - - - - 512 - 0 - true - - - - - - - - - - ${MONITOR_LOG_PATH}/lock.log - - ${MONITOR_LOG_PATTERN} - UTF-8 - - - ${MONITOR_LOG_PATH}/lock.log.${ROTATE_PATTERN} - 3 - 200MB - 1000MB - - - - 512 - 0 - true - - - - - - - \ No newline at end of file diff --git a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/logback-plus.xml b/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/logback-plus.xml index 658aeb0f..ad3bfa96 100644 --- a/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/logback-plus.xml +++ b/ruoyi-extend/ruoyi-powerjob-server/src/main/resources/logback-plus.xml @@ -1,14 +1,12 @@ - - + + + logback + - - - - ${console.log.pattern} @@ -16,117 +14,21 @@ - - - ${log.path}/sys-console.log + + ${log.path}.log - - ${log.path}/sys-console.%d{yyyy-MM-dd}.log - - 1 - - - ${log.pattern} - utf-8 - - - - INFO - - - - - - ${log.path}/sys-info.log - - - - ${log.path}/sys-info.%d{yyyy-MM-dd}.log + ${log.path}.%d{yyyy-MM-dd}.log 60 ${log.pattern} - - - INFO - - ACCEPT - - DENY - - - ${log.path}/sys-error.log - - - - ${log.path}/sys-error.%d{yyyy-MM-dd}.log - - 60 - - - ${log.pattern} - - - - ERROR - - ACCEPT - - DENY - - - - - - - 0 - - 512 - - - - - - - - 0 - - 512 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +