Keycloak exporter
|
|
The Keycloak exporter is used to extract statistics and status information from Keycloak.
Configuration
The exporter is provided via a Service Provider Interface (SPI) and can be downloaded here: GitHubhttps://github.com/aerogear/keycloak-metrics-spi/releases/latest[- Keycloak Metrics SPI,window=_blank]
-
Place the file
keycloak-metrics-spi.jarin the Keycloak directory[Pfad zum Keycloak]/providers/. -
Start Keycloak again.
-
Activate SPI in Keycloak in each realm for which metrics are to be supplied.
To do this, go to Manage > Events > Config in the realm settings and add themetricslistener to the event listeners:
The metrics can now be called up via the following URL:
https://[hostname]/auth/realms/[realm]/metrics
|
The data for all realms is contained under one URL. You can also call up the master realm here, even if no event listener has been configured. |
Set up exporter
As the exporter is not accessible at [hostname]/metrics, metrics_path must also be transferred here:
- job_name: 'keycloak'
metrics_path: /auth/realms/master/metrics
static_configs:
- targets: ['hostname']
labels:
instance: 'Keycloak Test'