跳到主內容

Actuator+Prometheus+Grafana監控視覺化簡介

https://www.tpisoftware.com/tpu/articleDetails/2446

pom.xml 需增加以下依賴:

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
  <groupId>io.micrometer</groupId>
  <artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
#management.endpoint.health.show-details=ALWAYS
#management.endpoints.web.base-path=/monitor
management.endpoints.web.exposure.include=prometheus,metrics