Skip to content

Commit

Permalink
Merge pull request #133 from raul-verdi/update_docs_keycloak_quarkus
Browse files Browse the repository at this point in the history
Add Keycloak Qarkus Instructions
  • Loading branch information
pb82 authored May 13, 2022
2 parents 823d6aa + 0ffd053 commit 15aa5e4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ mvn clean package -Dkeycloak.version=15.0.0 -Dprometheus.version=0.9.0

## Install and setup

### On Keycloak Widfly Distribution
> This section assumes `/opt/jboss` as the Keycloak home directory, which is used on the _jboss/keycloak_ reference container on Docker Hub.
- Drop the [jar](https://github.com/aerogear/keycloak-metrics-spi/releases/latest) into the _/opt/jboss/keycloak/standalone/deployments/_ subdirectory of your Keycloak installation.
Expand All @@ -83,6 +84,28 @@ touch keycloak-metrics-spi-2.0.2.jar.dodeploy
```
- Restart the keycloak service.

### On Keycloak Quarkus Distribution

> We assume the home of keycloak is on the default `/opt/keycloak`
You will need to either copy the `jar` into the build step and run step, or copy it from the build stage. Following the [example docker instructions](https://www.keycloak.org/server/containers)
No need to add `.dodeploy`.

```
# On build stage
COPY keycloak-metrics-spi.jar /opt/keycloak/providers/
# On run stage
COPY keycloak-metrics-spi.jar /opt/keycloak/providers/
```
If not copied to both stages keycloak will complain
```
ERROR: Failed to start quarkus
ERROR: Failed to open /opt/keycloak/lib/../providers/keycloak-metrics-spi.jar
```
The endpoint for the metrics is `<url>/<http_relative_path>/realms/<realm>/metrics`

### Enable metrics-listener event

- To enable the event listener via the GUI interface, go to _Manage -> Events -> Config_. The _Event Listeners_ configuration should have an entry named `metrics-listener`.
Expand Down

0 comments on commit 15aa5e4

Please sign in to comment.