Skip to content

Keycloak Integration

Use this integration when you want to scrape Keycloak metrics from its Prometheus-compatible metrics endpoint and send them to KloudMate through the KloudMate Agent.

  1. Install and run the KloudMate Agent.
  2. Ensure your Keycloak service exposes the /auth/metrics endpoint. If this endpoint is not available, no metrics will be scraped.
  3. Keycloak must be reachable from the host or cluster where the KloudMate Agent is running.
  1. Go to Settings → Agents.
  2. Find the agent you want to configure and select the three dots.
  3. Choose Configure.
  4. Go to Collector config.

Add the following configuration. Replace <keycloak-service-name> and <namespace> with your actual Kubernetes service name and namespace.

  • If the agent runs in managed mode, add it to the Custom config override section. See Custom config override.
  • If the agent runs in manual mode, add it directly to the collector configuration.
receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: keycloak
          metrics_path: /auth/metrics
          scheme: http
          static_configs:
            - targets:
                - <keycloak-service-name>.<namespace>.svc.cluster.local:8080

service:
  pipelines:
    metrics/keycloak:
      receivers:
        - prometheus
      processors:
        - batch
      exporters:
        - otlphttp

Validate indentation carefully when copying scrape_configs into the Agent configuration.

Click Save. The Agent restarts and applies the new configuration.

After the Agent restarts:

  • Open Explore in KloudMate.
  • Query one of the scraped Keycloak metrics.
  • Build dashboards or alerts once data is visible.