title: Setting up a Keycloak exporter to work with Prometheus
body: <p>I'm trying to setup a Prometheus exporter for Keycloak however I'm having difficulty.</p>
  
  <p>I have a web based application built using docker containers and I'm now adding user permissions through the use of keycloak</p>
  
  <p>I found this on github <a href="https://github.com/aerogear/keycloak-metrics-spi" rel="nofollow noreferrer">https://github.com/aerogear/keycloak-metrics-spi</a> however I've never really used something like this in conjunction with Docker and so I'm unsure if I performed the steps in the readme correctly</p>
  
  <p>Note I performed all the below steps manually.</p>
  
  <ol>
  <li>Downloaded and unzipped github repo to host machine</li>
  <li>Ran the command stated "./gradlew jar"</li>
  <li>Created a new directory inside the keycloak directory called providers</li>
  <li>Copied the jar file from /build/libs to the providers foler</li>
  <li>Went to Keycloak GUI and went to mange -> events -> config and added metrics-listener as a named entry</li>
  </ol>
  
  <p>Based on the github repo after this I went to localhost/auth/realms/master/metrics however there was nothing there. Did I go about setting up this correctly? Alternatively, does anybody know of any other exporters which might be better suited to using a docker setup?</p>
  
  <p>Thanks</p>