Skip to content

Commit

Permalink
Fix #1227: Add micrometer-registry-prometheus [Backport] (#1355)
Browse files Browse the repository at this point in the history
* Fix #1227: Add micrometer-registry-prometheus
(cherry picked from commit 34fa58e)
* - fix spring docs reference
---------
Co-authored-by: Lubos Racansky <[email protected]>
  • Loading branch information
jandusil authored Feb 27, 2024
1 parent a5791a0 commit 2267016
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/Configuration-Properties-Admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ The PowerAuth Admin application uses the following public configuration properti
| `powerauth.admin.security.ldap.ldif` | `_empty_` | Specifies an ldif to load at startup for an embedded LDAP server. |
| `powerauth.admin.security.ldap.managerDN` | `_empty_` | Username (DN) of the "manager" user identity (i.e. "uid=admin,ou=system") which will be used to authenticate to a (non-embedded) LDAP server. If omitted, anonymous access will be used. |
| `powerauth.admin.security.ldap.managerPassword` | `_empty_` | The password for the manager DN. This is required if the `managerDN` property is set. |


## 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/2.7.18/reference/html/actuator.html#actuator.metrics).
6 changes: 6 additions & 0 deletions docs/Configuration-Properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ The PowerAuth Server uses the following public configuration properties:
| `powerauth.service.correlation-header.name` | `X-Correlation-ID` | Correlation header name |
| `powerauth.service.correlation-header.value.validation-regexp` | `[a-zA-Z0-9\\-]{8,1024}` | Regular expression for correlation header value validation |
| `logging.pattern.console` | [See value in application.properties](https://github.com/wultra/powerauth-server/blob/develop/powerauth-java-server/src/main/resources/application.properties#docucheck-keep-link) | Logging pattern for console which includes the correlation header value |


## 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/2.7.18/reference/html/actuator.html#actuator.metrics.
6 changes: 6 additions & 0 deletions powerauth-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@
<classifier>osx-aarch_64</classifier>
</dependency>

<!-- Monitoring -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

<!-- Test libraries -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
6 changes: 6 additions & 0 deletions powerauth-admin/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ spring.jpa.open-in-view=false

# Disable LDAP check in health actuator
management.health.ldap.enabled=false

# Monitoring
#management.endpoint.metrics.enabled=true
#management.endpoints.web.exposure.include=health, prometheus
#management.endpoint.prometheus.enabled=true
#management.prometheus.metrics.export.enabled=true
1 change: 0 additions & 1 deletion powerauth-java-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<scope>runtime</scope>
</dependency>

<!-- Test Dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,9 @@ powerauth.service.correlation-header.value.validation-regexp=[a-zA-Z0-9\\-]{8,10
#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}

powerauth.service.proximity-check.otp.length=8

# Monitoring
#management.endpoint.metrics.enabled=true
#management.endpoints.web.exposure.include=health, prometheus
#management.endpoint.prometheus.enabled=true
#management.prometheus.metrics.export.enabled=true

0 comments on commit 2267016

Please sign in to comment.