From 4b82e5a764f7d37d9c43891b01151a9b576a1a86 Mon Sep 17 00:00:00 2001 From: zhangzq Date: Fri, 19 Jan 2024 16:57:12 +0800 Subject: [PATCH] =?UTF-8?q?add:=E6=B7=BB=E5=8A=A0prometheushttp=E7=9B=91?= =?UTF-8?q?=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lms/nladmin-system/pom.xml | 10 +++++++++- .../main/resources/config/application-dev.yml | 20 ++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/lms/nladmin-system/pom.xml b/lms/nladmin-system/pom.xml index d15ce7903..15ca595b0 100644 --- a/lms/nladmin-system/pom.xml +++ b/lms/nladmin-system/pom.xml @@ -63,7 +63,15 @@ ik-analyzer 8.2.0 - + + + io.micrometer + micrometer-registry-prometheus + + + org.springframework.boot + spring-boot-starter-actuator + org.apache.lucene diff --git a/lms/nladmin-system/src/main/resources/config/application-dev.yml b/lms/nladmin-system/src/main/resources/config/application-dev.yml index f2b4be975..8e72c8c4b 100644 --- a/lms/nladmin-system/src/main/resources/config/application-dev.yml +++ b/lms/nladmin-system/src/main/resources/config/application-dev.yml @@ -44,7 +44,8 @@ spring: reset-enable: false filters: DruidFilter,stat -# stat: +# query-timeout: 1 + # stat: # enabled: true # # 记录慢SQL # log-slow-sql: true @@ -173,3 +174,20 @@ es: lucene: index: path: D:\lms\lucene\index +management: + endpoints: + web: + exposure: + include: prometheus + base-path: /metrics + metrics: + prometheus: + enabled: true + enable: + process: false + integration: false + uptime: false + jdbc: false + system: false + jvm: false + logback: false