diff --git a/docs/Configuration-Properties.md b/docs/Configuration-Properties.md index 9a0295a8d..46718a263 100644 --- a/docs/Configuration-Properties.md +++ b/docs/Configuration-Properties.md @@ -60,3 +60,9 @@ Sample setting of logging pattern: ```properties logging.pattern.console=%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:%5p}) [%X{X-Correlation-ID}] %clr(%5p) %clr(${PID: }){magenta} %clr(---){faint}%clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx} ``` + + +## Monitoring and Observability + +The WAR file includes the `micrometer-registry-prometheus` dependency. +Discuss its configuration with the [Spring Boot documentation](https://docs.spring.io/spring-boot/docs/3.1.x/reference/html/actuator.html#actuator.metrics). diff --git a/docs/onboarding/Configuration-Properties.md b/docs/onboarding/Configuration-Properties.md index 0ae467ce7..799d45a15 100644 --- a/docs/onboarding/Configuration-Properties.md +++ b/docs/onboarding/Configuration-Properties.md @@ -167,3 +167,9 @@ Sample setting of logging pattern: ```properties logging.pattern.console=%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:%5p}) [%X{X-Correlation-ID}] %clr(%5p) %clr(${PID: }){magenta} %clr(---){faint}%clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx} ``` + + +## Monitoring and Observability + +The WAR file includes the `micrometer-registry-prometheus` dependency. +Discuss its configuration with the [Spring Boot documentation](https://docs.spring.io/spring-boot/docs/3.1.x/reference/html/actuator.html#actuator.metrics). diff --git a/enrollment-server-onboarding/pom.xml b/enrollment-server-onboarding/pom.xml index 10ba0fb81..3c9f79bb3 100644 --- a/enrollment-server-onboarding/pom.xml +++ b/enrollment-server-onboarding/pom.xml @@ -142,6 +142,12 @@ logstash-logback-encoder + + + io.micrometer + micrometer-registry-prometheus + + org.springframework.boot diff --git a/enrollment-server-onboarding/src/main/resources/application.properties b/enrollment-server-onboarding/src/main/resources/application.properties index 29f2fcf68..09f3c82f0 100644 --- a/enrollment-server-onboarding/src/main/resources/application.properties +++ b/enrollment-server-onboarding/src/main/resources/application.properties @@ -206,4 +206,10 @@ powerauth.service.correlation-header.enabled=false powerauth.service.correlation-header.name=X-Correlation-ID powerauth.service.correlation-header.value.validation-regexp=[a-zA-Z0-9\\-]{8,1024} # For logging correlation HTTP headers enable the pattern and update correlation header name in the pattern -#logging.pattern.console=%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:%5p}) [%X{X-Correlation-ID}] %clr(%5p) %clr(${PID: }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx} \ No newline at end of file +#logging.pattern.console=%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:%5p}) [%X{X-Correlation-ID}] %clr(%5p) %clr(${PID: }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx} + +# Monitoring +#management.endpoint.metrics.enabled=true +#management.endpoints.web.exposure.include=health, prometheus +#management.endpoint.prometheus.enabled=true +#management.prometheus.metrics.export.enabled=true diff --git a/enrollment-server/pom.xml b/enrollment-server/pom.xml index 1da830ea3..bd0e7e310 100644 --- a/enrollment-server/pom.xml +++ b/enrollment-server/pom.xml @@ -117,6 +117,12 @@ logstash-logback-encoder + + + io.micrometer + micrometer-registry-prometheus + + org.springframework.boot diff --git a/enrollment-server/src/main/resources/application.properties b/enrollment-server/src/main/resources/application.properties index c16c6f2b3..a0da944e3 100644 --- a/enrollment-server/src/main/resources/application.properties +++ b/enrollment-server/src/main/resources/application.properties @@ -87,4 +87,10 @@ powerauth.service.correlation-header.enabled=false powerauth.service.correlation-header.name=X-Correlation-ID powerauth.service.correlation-header.value.validation-regexp=[a-zA-Z0-9\\-]{8,1024} # For logging correlation HTTP headers enable the pattern and update correlation header name in the pattern -#logging.pattern.console=%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:%5p}) [%X{X-Correlation-ID}] %clr(%5p) %clr(${PID: }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx} \ No newline at end of file +#logging.pattern.console=%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:%5p}) [%X{X-Correlation-ID}] %clr(%5p) %clr(${PID: }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx} + +# Monitoring +#management.endpoint.metrics.enabled=true +#management.endpoints.web.exposure.include=health, prometheus +#management.endpoint.prometheus.enabled=true +#management.prometheus.metrics.export.enabled=true