diff --git a/notification/pom.xml b/notification/pom.xml index 0c1d0dbd2234e4f447e52c6181ce69de08ea0395..8ac8840fa4e8472d504fad0f4e20a5147daa435d 100644 --- a/notification/pom.xml +++ b/notification/pom.xml @@ -104,6 +104,18 @@ <version>3.0.4</version> </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/notification/src/main/resources/application.properties b/notification/src/main/resources/application.properties index 67b74b143553fda6ca63c21b731f11201fa723e1..e0cdf8282c04067df800df2f8086bc69686d291f 100644 --- a/notification/src/main/resources/application.properties +++ b/notification/src/main/resources/application.properties @@ -6,4 +6,9 @@ spring.mail.password=cwnlsvcodawlphvu spring.mail.protocol=smtps spring.mail.properties.mail.from.email=formula.team.management@gmail.com spring.mail.properties.mail.smtp.auth=true -spring.mail.properties.mail.smtp.starttls.enable=false \ No newline at end of file +spring.mail.properties.mail.smtp.starttls.enable=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 0b88ef954f75b1dacc190936a60b5dee4719116b..777e5225b871f8970b1f3f9850a55a758a694d7a 100644 --- a/prometheus.yml +++ b/prometheus.yml @@ -10,4 +10,8 @@ scrape_configs: - job_name: 'formula-core' metrics_path: /actuator/prometheus static_configs: - - targets: [host.docker.internal:8080, host.docker.internal:8081] \ No newline at end of file + - targets: + - host.docker.internal:8080 + - host.docker.internal:8081 + - host.docker.internal:8082 + - host.docker.internal:8083 \ No newline at end of file diff --git a/visualization/pom.xml b/visualization/pom.xml index caa6b19b4a73944c4eadb1ce24b37a9c4c34889d..fbc4e967f9023901fa2e575c93ff1ab2c5df0069 100644 --- a/visualization/pom.xml +++ b/visualization/pom.xml @@ -102,6 +102,18 @@ <scope>test</scope> </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> \ No newline at end of file diff --git a/visualization/src/main/resources/application.properties b/visualization/src/main/resources/application.properties index 3cf12afeb96e226882312742d8f8c3206e6c387c..54fbf76c7b79297e3499b7c4d940166af1d61d96 100644 --- a/visualization/src/main/resources/application.properties +++ b/visualization/src/main/resources/application.properties @@ -1 +1,6 @@ server.port=8082 + +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