Skip to content

Commit

Permalink
Merge pull request #611 from NUM-Forschungsdatenplattform/feature/pro…
Browse files Browse the repository at this point in the history
…metheus-exporter

add prometheus exporter
  • Loading branch information
ramueSVA authored Sep 10, 2024
2 parents ec66e89 + 136a741 commit 2dd9e49
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public WebSecurityCustomizer webSecurityCustomizer() {
.requestMatchers(HttpMethod.GET, "/content/navigation")
.requestMatchers(HttpMethod.GET, "/content/cards")
.requestMatchers(HttpMethod.GET, "/content/metrics")
.requestMatchers(HttpMethod.GET, "/actuator/health/**")
.requestMatchers(HttpMethod.GET, "/actuator/info**");
.requestMatchers(HttpMethod.GET, "/actuator/health")
.requestMatchers(HttpMethod.GET, "/actuator/info")
.requestMatchers(HttpMethod.GET, "/actuator/prometheus");
}
}
7 changes: 6 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,24 @@ management:
enabled-by-default: false
web:
exposure:
include: health,info
include: health, info, prometheus
endpoint:
health:
enabled: true
probes:
enabled: true
info:
enabled: true
prometheus:
enabled: true
health:
mail:
enabled: false
server:
port: 8091
metrics:
tags:
application: ${spring.application.name}

springdoc:
swagger-ui:
Expand Down

0 comments on commit 2dd9e49

Please sign in to comment.