diff --git a/application/pom.xml b/application/pom.xml index b60058e8bb211a448babbc7cfdfb12d749a7b5ed..5c05b4d33520af90ce63d0e90f7bace770b8f57a 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -152,5 +152,17 @@ <groupId>com.github.ben-manes.caffeine</groupId> <artifactId>caffeine</artifactId> </dependency> + + <!-- Actuator dependency--> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-actuator</artifactId> + </dependency> + + <!-- Prometheus dependency --> + <dependency> + <groupId>io.micrometer</groupId> + <artifactId>micrometer-registry-prometheus</artifactId> + </dependency> </dependencies> </project> diff --git a/application/src/main/resources/application.properties b/application/src/main/resources/application.properties index 7fad57726aa95f797fe5413260c86a0442b64370..698b657daaa27aed0566ba8ed7402c942f2bf35b 100644 --- a/application/src/main/resources/application.properties +++ b/application/src/main/resources/application.properties @@ -11,4 +11,9 @@ spring.jpa.show-sql=true spring.jackson.property-naming-strategy=SNAKE_CASE spring.cache.type=NONE spring.profiles.active=dev -appconfig.enablecache=false \ No newline at end of file +appconfig.enablecache=false + +management.endpoints.web.exposure.include=health,metrics,loggers,beans,prometheus +management.endpoint.health.show-details=always +management.endpoint.health.show-components=always +management.endpoint.health.probes.enabled=true \ No newline at end of file diff --git a/prometheus.yml b/prometheus.yml index 32429004c8c3fb7fb3d79a4862d18ff7d157390a..0b88ef954f75b1dacc190936a60b5dee4719116b 100644 --- a/prometheus.yml +++ b/prometheus.yml @@ -10,4 +10,4 @@ scrape_configs: - job_name: 'formula-core' metrics_path: /actuator/prometheus static_configs: - - targets: [host.docker.internal:8080] \ No newline at end of file + - targets: [host.docker.internal:8080, host.docker.internal:8081] \ No newline at end of file