Why Keycloak monitoring and metrics matter before go-live
Every application that signs users in will depend on this Keycloak instance, so its health has to be visible before the first user arrives. This page covers enabling the Prometheus-format metrics endpoint at /metrics on the management interface when Keycloak starts with the metrics option turned on, scraping that endpoint with Prometheus, wiring orchestration health checks, and defining the alert signals worth acting on: login failures, request latency and cache health. The aim is to know that sign-in is working, and to learn quickly when it is not, before a business owner or help desk does.
Monitoring is harder than it looks for three reasons. First, the metrics endpoint is off by default, so a fresh installation exposes nothing to Prometheus until someone deliberately enables it with the metrics setting. Teams that assume it is on often discover the gap during an incident. Second, the endpoint belongs on the management interface, not the public hostname. Keycloak's production guidance already separates the admin console and administration API from public frontend URLs, and metrics deserve the same treatment. Your reverse proxy rules should block /metrics from internet traffic, and your network policy should allow only the scraper and the health probes to reach it. Confirm the exact management port and path behavior against the version you deploy, because the defaults have changed between releases.
Third, the optional HTTP request and cache histograms are valuable for latency and cache analysis, but each histogram creates many time series. Every label combination multiplies the series count, so a busy realm with many clients can make Prometheus storage and query cost grow faster than expected. Decide which histograms you need before go-live, set a scrape interval your Prometheus capacity can carry, and test the series count in a staging environment that resembles production traffic. Ask your platform team who owns the Prometheus retention budget, because that owner will feel the cost first.
The most important point is that failures often reach you as user complaints before they reach you as alerts. A broken client secret, an expired certificate on a downstream service or a database connection pool running dry can make sign-in fail for one application while the process still reports healthy. Build the alert set around symptoms users feel: a rise in failed logins, a rise in response time and falling cache hit rates, alongside the basic liveness and readiness checks your orchestrator uses. Then rehearse one failure in staging and confirm that an alert fires, reaches a person and points to a runbook. Plan the alert routing and the on-call owner as part of the rollout, not after the first outage.
Which Keycloak components and endpoints the monitoring stack touches
A Keycloak monitoring setup spans more than the identity server. The metrics switch, the management endpoints, the scraper, and the database and cache layers each report a different part of the picture, and each has a different owner. Knowing which component reports what tells you where to look when a sign-in alert fires.
Metrics startup setting
Metrics collection is switched on when Keycloak starts with the --metrics-enabled=true option. Without it, the metrics endpoint is not exposed, so a scrape returns nothing useful. Your platform or identity team owns this setting in the startup command, container arguments or Operator resource. Confirm the exact option syntax for your Keycloak version in the observability guide before you rely on it in a template.
Prometheus-format metrics endpoint
Keycloak serves Prometheus-format metrics at /metrics on its management interface, not on the public hostname that users sign in through. Keeping metrics on the management side means they are not exposed to the internet by default. Confirm the path and the management port for your version, and check that your network policy allows only your monitoring stack to reach it.
Optional HTTP and cache histograms
Keycloak can add histograms for HTTP request timing and for cache operations. These are optional and add series to every scrape, so they should be enabled deliberately. They are the source for latency percentiles and cache behavior. Ask the identity team which histograms they need, and confirm the metric names and label sets for your version before you write dashboards or alert rules.
Health endpoints for orchestration
Health endpoints tell load balancers and orchestrators whether an instance should receive traffic or be restarted. Liveness and readiness answer different questions, and mixing them up can cause restart loops during a slow database recovery. The platform team owns the probe configuration. Confirm the health paths and their response behavior in the observability guide for your release.
Prometheus server and scrape configuration
Prometheus pulls metrics on a schedule defined in its scrape configuration, which sets targets, interval, authentication and TLS. A missing or misnamed target fails silently, so dashboards go flat without an error in Keycloak. The observability or platform team owns the scraper and its retention. Check that every Keycloak node, including those in each availability zone, appears as a target.
Database health signals
Keycloak depends on a supported production database, and slow queries or lost connections appear first as slow logins and failed token requests. Database metrics come from the database platform or its exporter, not from Keycloak itself. The DBA or cloud team owns them. Ask who is paged for database saturation and whether those alerts are routed to the same channel as Keycloak alerts.
Cache and cluster health
Keycloak keeps sessions and cached data in a distributed cache, and cluster membership problems show up as lost sessions or inconsistent logouts. Cache health signals are exposed through Keycloak's metrics and logs, and they matter most in multi-node and multi-site designs. The identity platform team owns this layer. Confirm which cache metrics your version exposes and which cluster events should trigger an alert.
Decisions to make before enabling metrics
This table compares the main choices you face before turning on Keycloak metrics: where the endpoint lives, how much detail to collect, how metrics leave the cluster, which health checks each system uses, and who gets paged. Read each row as a decision with an operational cost attached, and settle the first two rows before anyone writes a scrape config. The main takeaway is that the network and credential work usually costs more than the flag itself.
| Decision | Option | When it fits | Operational cost |
|---|---|---|---|
| Where /metrics is exposed | Management interface only, reached from the scraper's network segment | Single cluster where the Prometheus server already sits on the private network with Keycloak nodes | Needs a network policy or firewall rule that allows the scraper to reach the management port; confirm the port with your Keycloak version's configuration guide |
| Where /metrics is exposed | Separate internal listener in front of the scraper, kept off the public reverse proxy | Regulated environments where the public proxy must not forward operational paths and the scraper runs in another zone | Adds proxy or load balancer rules, a second route to keep in review, and an owner for the internal listener's TLS and access settings |
| HTTP request and cache histograms | Enable with the optional histogram settings | Teams that need latency percentiles per endpoint or want to see cache behavior during an incident | Histograms create many more time series than counters and gauges, which raises Prometheus storage, memory and query cost; estimate series count in a test cluster first |
| HTTP request and cache histograms | Keep base metrics only | Early rollouts, small clusters, or teams whose Prometheus retention is short and tightly budgeted | Lower series volume, but latency analysis during incidents relies on logs or proxy metrics instead |
| Scraping model | Pull-based Prometheus scraping of each node | Kubernetes or VM estates where Prometheus can reach every node and the team already runs Prometheus | Requires a scrape job, a service discovery rule for each node, and credentials or network rules that allow the scrape; target churn during scaling must be watched |
| Scraping model | Push through an agent or managed collector | Environments where inbound scraping is blocked, or an existing agent or collector already ships metrics out of the network | Adds an agent to patch and monitor, a collector configuration to version, and a second failure point between Keycloak and the alerting system |
| Health checks | Load balancer probe on the public or proxy-facing path | Deciding whether a node should receive user traffic at all | Probe paths must be reachable from the load balancer subnet and must not expose operational detail publicly; confirm the path and its response codes for your version |
| Health checks | Orchestrator liveness and readiness probes on the management interface | Kubernetes or container platforms that restart or remove unhealthy pods | A probe that is too strict can restart nodes during a slow database failover, so thresholds need load testing before go-live |
| Alert recipients and channel | Platform on-call receives pages for node down, database errors and cluster membership problems | Keycloak is a shared login dependency and the platform team owns its uptime | Requires a documented escalation path, runbooks for each alert and a named owner for silencing rules during planned maintenance |
| Alert recipients and channel | Identity team receives tickets for login failure spikes and brute force patterns | Signals such as failed logins, lockouts and token errors often need identity knowledge to judge | Needs thresholds agreed with the security team and a rule for when a ticket becomes a security incident |
How to enable and scrape Keycloak metrics step by step
This sequence takes a Keycloak deployment from unmonitored to one where metrics are scraped, health checks drive orchestration, and alerts have been tested to fire. Each step closes with a check you can run, so the team confirms each signal works before relying on it. Run the sequence in a lower environment first, then repeat it for production.
Confirm the release and startup configuration
Record the Keycloak release you run and the startup options it uses, then make the changes in a non-production server and realm first. The current release in the researched facts is 26.8.1, published October 13, 2026, so check whether your deployment is on that line or an earlier one, and read the upgrade notes for every version in between. The platform or identity engineer owns this step. It is done when a written record exists that names the release, the startup flags and the test environment where the following steps will run.
Enable metrics and confirm the management endpoint
Start the test instance with metrics enabled through the --metrics-enabled=true option, then restart it. From a host inside the network, request the /metrics path on the management interface and confirm it returns Prometheus-format text. Next, request the same path through the public hostname and confirm it does not return metrics. The check passes only when metrics appear on the management side and the public hostname does not expose them. If the public hostname answers, correct the reverse proxy path rules before moving on.
Decide on histograms after reviewing series volume
The HTTP request and cache histograms are optional. Enable them in the test environment, then count the resulting time series and the labels attached to each metric. Histograms create many more series per metric, which raises storage use in Prometheus and the cost of queries. Confirm the expected series count with whoever owns monitoring, and record whether production will enable histograms. The check is a series count taken before and after enabling, compared against your storage plan. Confirm the exact option names in the observability guide for your release.
Restrict network access to the scraper
Limit access to the management interface so that only the Prometheus server or its scrape proxy can reach it. Enforce this at the firewall, security group or network policy layer. Keep the admin console and the Administration REST API on hostnames separate from public frontend URLs, as the production guide describes. Metrics can reveal internal topology and traffic patterns, so treat them as sensitive. Confirm the restriction by requesting the metrics path from an unapproved host, which should fail, and from the approved scraper, which should succeed.
Add the Prometheus scrape job and confirm up
Add a scrape job to the Prometheus configuration that targets the management interface of each Keycloak node, using the metrics path and TLS settings your design requires. Reload Prometheus and open its targets view. Each Keycloak instance should show as up with a recent last-scrape time. If a target is down, check the network rule from the previous step, the port and the TLS certificate trust before editing the job. Then run a query for a Keycloak metric to confirm that data is arriving, not only that the target responds.
Wire health checks into the load balancer and orchestrator
Point the load balancer and the orchestrator at Keycloak's health endpoints, using separate checks for liveness and readiness. Liveness shows that the process is running. Readiness should pass only when the database connection and cluster membership work, so that a node with a broken dependency leaves rotation. To confirm this, block the database connection in the test environment and verify that the node is removed from the load balancer. The check passes when readiness changes with the fault, not only when the process is running. Confirm the endpoint paths in the observability documentation for your release.
Build dashboards for latency, logins and cache
Build dashboard panels for three areas: request latency from the HTTP metrics, login outcomes such as successes and failures, and cache behavior for the caches Keycloak exposes. Use the metric names that appear in your own /metrics output, because names can change between releases. Label each panel with the question it answers, and review the layout with an identity operator who knows normal traffic for your realms. The check is a dashboard that shows known test logins, including one deliberate failed login, in the expected panels.
Set alert rules and test each one
Write alert rules for login failure rates, latency above the level your users can accept, cache health, and targets that stop responding. Set thresholds from the baseline you observed in the test environment rather than from generic defaults. Then trigger each condition on purpose in a lower environment: send repeated failed logins, slow a dependency, and stop a node. Confirm that each alert fires, reaches the on-call channel and clears after recovery. Record the result for every rule, since an alert that has never fired has not been proven.
How monitoring differs for single node, clustered and Kubernetes deployments
A single Keycloak node is the simplest case: one scrape target, one health endpoint and one set of metrics to read. That simplicity is also the main risk. When the node restarts for patching, a configuration change or a failed start, the scrape target disappears and the monitoring system may show nothing at all, which can look like a quiet period rather than an outage. Monitoring for this model should make absence visible.
Points to set up:
- Enable metrics on the management interface with the metrics option, then confirm the Prometheus-format endpoint at the documented path responds from the monitoring host.
- Add an alert on the scrape target being down, separate from any application-level alert, so a missing node is never silent.
- Use the health endpoints for liveness and readiness checks in your load balancer or service manager, and confirm the exact probe paths for your installed version.
- Decide whether HTTP request and cache histograms are needed; enable them only if you have capacity to store and query them.
- Track login failures and token request latency from the metrics, and expect gaps in these series during every restart.
Before go-live, ask your team to stop the node on purpose and confirm that the scrape-down alert fires and that someone is notified. Check that the restart window is visible in dashboards so operators can tell planned maintenance from a fault.
A clustered deployment runs several Keycloak nodes against an external database that is synchronously replicated, as the high availability documentation requires for supported designs. Monitoring must now cover each node individually and the cluster as a whole. A healthy average can hide one node that is failing, and a failover can move load so that a single node looks overloaded while the cluster is fine.
Points to set up:
- Scrape every node separately, labeling each series with its node or instance, so that a single failing member is visible.
- Build cluster-level views by aggregating across nodes, and keep per-node panels next to them for diagnosis.
- Watch cache health and database health together. Cache trouble and database latency often appear at the same time and point to the same cause.
- Alert on the number of healthy nodes dropping below your minimum, not only on a single node being down.
- Test failover on purpose and record how long login errors and latency last, then compare that against your own availability target.
Ask your architecture team which replication and failover behavior the chosen database provides, and confirm the monitoring design with the database operator as well as the Keycloak team. Confirm the metric names and any cache-related series for your installed version before writing alert rules.
When Keycloak runs under the Keycloak Operator, much of the wiring is managed for you, but the monitoring design still needs deliberate choices. The operator creates the workloads and services, so scraping usually goes through service discovery or a ServiceMonitor-style resource rather than hard-coded addresses. Scrape targets then follow pod replacement automatically, which removes the blind spot that a fixed single-node target creates during restarts.
Points to set up:
- Scrape through service discovery or a ServiceMonitor-style resource. Confirm the exact resource names and label selectors against the operator documentation for the version you installed.
- Use the probes the operator configures for readiness and liveness, and confirm the probe paths rather than copying them from older guides.
- Confirm how the operator-managed management port is exposed, and whether the metrics path is reachable from your monitoring namespace under your network policies.
- Keep metrics endpoints off public ingress, consistent with the production guidance on separating the management interface from public URLs.
- Monitor operator upgrades and rollout events alongside Keycloak metrics, since manual approval mode means changes arrive on your schedule and should be correlated with alerts.
Before relying on dashboards, delete a Keycloak pod in a test namespace and confirm the scrape target returns, the readiness probe gates traffic, and the alerts behave as expected. Record the operator and Keycloak versions with each dashboard so that a later upgrade does not silently change what a metric means.
What drives the effort and cost of Keycloak monitoring
This table lists the factors that change how much work Keycloak monitoring takes, from node count and realm count to the monitoring stack you already run. Read each row as a question to answer before scoping, with the reduction tactic beside it. The main takeaway is that a single standardized scrape template and a limited set of alerted signals usually matter more than the raw size of the deployment.
| Driver | Why it changes effort | How to keep it down |
|---|---|---|
| Nodes and environments | Each node exposes its own metrics endpoint, and each environment needs its own scrape targets, dashboards and alert thresholds. | Use one scrape template and one dashboard set across dev, test and production, varying only labels and target lists. |
| Realms and clients | Per-client or per-realm labels multiply the number of time series Prometheus stores and dashboards must filter through. | Limit per-client labels to the clients you actually need to troubleshoot, and review series counts after each realm onboarding. |
| High availability design | A clustered deployment means metrics must be read per node and aggregated, and failover behavior must be visible in the same views. | Aggregate by cluster in recording rules and alert on cluster-level symptoms before per-node noise. |
| Existing Prometheus or observability platform | If you already run Prometheus, Grafana or a hosted equivalent, Keycloak adds scrape jobs and dashboards; if not, you add the whole stack. | Confirm your platform supports the scrape method and retention you need before deciding to build new tooling. |
| Alert routing and on-call integration | Each alert needs an owner, a severity and a route into your paging or ticketing system, and noisy rules create ongoing toil. | Reuse the existing alert pipeline and alert only on login failure, latency and cache health signals your team will act on. |
| Histograms and metric volume | HTTP request and cache histograms add series and storage, and their cost grows with node and realm count. | Enable histograms only when you need latency percentiles, and confirm their storage impact in a test environment first. |
| Log and metric retention for compliance | Your security or compliance requirements may set how long metrics, events and alert history must be kept and who can read them. | Ask your compliance lead which retention periods apply and set Prometheus or long-term storage settings to match, rather than guessing. |
How to test that Keycloak metrics and health checks work
Monitoring is only trustworthy once you have watched it fail on purpose. Before go-live, run a short set of acceptance tests that prove the metrics endpoint is exposed in the right place, that Prometheus actually collects from every node, that health checks remove a bad node from rotation, and that the alerts you rely on fire under realistic stress in a lower environment. Each test below has an expected result you should write down before you run it, so the outcome is a pass or fail rather than a judgment call.
Start with exposure. Keycloak serves Prometheus-format output at /metrics on its management interface when it is started with metrics enabled. Confirm two things from outside the cluster. First, a request to the management interface returns metrics text. Second, the same path requested through the public hostname that serves sign-in is refused. Run both requests from the network where your Prometheus server sits and from an internet-facing vantage point, because a reverse proxy rule that looks correct on paper can still forward the path. Also confirm that the admin console and Administration REST API are on a separate hostname or context path, as the production guide recommends, since that separation is what keeps the metrics path off public routes. Ask your platform team to show the proxy configuration that enforces it.
Next, prove that collection works across restarts. Restart one node and watch its target in the Prometheus targets view. It should move to down while the process is unavailable and return to up once the node is ready and serving metrics again. Check that the series for that instance resume rather than appearing under a new label, since a changed instance name will break dashboards and alert rules that filter on it. If you run Keycloak on Kubernetes, repeat the test with a pod deletion so you also see how service discovery handles a replacement pod. Record how long the target stays down, because that gap is the blind spot your alerting must cover.
Then test the cluster behavior. Stop one node in a multi-node deployment and confirm two separate reactions. The load balancer or orchestrator health check should stop sending new requests to that node, and existing users on other nodes should keep signing in without errors. The monitoring side should also react: the target goes down, and the alert you defined for lost instances fires within the window you agreed. A health check that removes the node but no alert is a silent degradation, so treat a missing alert as a failed test. Confirm the health endpoints are wired to the correct probes, liveness for restarting a stuck process and readiness for taking traffic, and that a node still starting up is not marked ready early.
Finally, exercise the signals that matter for an identity service. In a test realm with a disposable user, generate a burst of failed password attempts and confirm the login failure counter moves and that your dashboard shows the spike. Then, in a lower environment only, add artificial latency to the database or create cache pressure by reducing cache size or running a load test, and confirm the latency and cache alerts trigger at the thresholds you set. Finally, stop the monitoring stack itself and confirm something still tells a person: a dead-man switch, an external probe, or an alert manager heartbeat should page the on-call team. Keep a short acceptance checklist: metrics only on the management interface, public path refused, targets recover after restart, failover removes a node and alerts, login failure and latency alerts fire in test, and loss of monitoring raises an alert.
How to lock down metrics and health endpoints
Keycloak's metrics and health endpoints expose sign-in volumes, failure patterns and internal state, so they need the same boundary discipline as the admin console. The cards below cover where the endpoints sit, who can reach them, how traffic is protected, what appears in dashboards and alerts, and how credentials and dashboard access are governed.
Keep endpoints off the public hostname
Metrics are served on the management interface when metrics are enabled, not on the public frontend. Keycloak's production guide separates admin and public URLs, and the same logic applies here. Check from outside your network that /metrics and the health paths do not resolve through the public hostname or any reverse proxy route, including paths your proxy may forward by wildcard.
Restrict scrape access by network policy
Limit which sources can reach the management port to the Prometheus servers or scrape agents that need it. In Kubernetes this means a network policy scoped to the monitoring namespace, and on virtual machines it means host firewall rules or security group allow lists. Confirm the rule set by testing a request from a host that is not on the list and verifying it is refused.
Encrypt scrape traffic on untrusted paths
If Prometheus reaches Keycloak across a network segment you do not control, such as another cloud account, a shared cluster network or a routed data center link, serve the management endpoints over TLS and configure Prometheus to verify the server certificate. Confirm with your platform team how certificates are issued and rotated, because an expired scrape certificate silently stops metrics collection.
Keep identifiers out of dashboards and alerts
Metric labels and alert annotations should describe realms, clients, outcomes and counts, not individual usernames, email addresses, IP addresses or client secrets. Review the labels your dashboards and alert templates render, and check the notification channels that receive them, such as chat rooms or paging tools, since those copies are often held longer and read by more people than the dashboard.
Manage Prometheus and Alertmanager credentials as secrets
Basic auth passwords, bearer tokens, webhook URLs and SMTP credentials used by Prometheus and Alertmanager belong in a secrets store with rotation and access logging, not in plain configuration files or source control. Ask who owns each credential, how it is rotated without downtime to scraping, and whether the same secret is reused across environments.
Review who can read sign-in dashboards
Dashboards that show sign-in volumes and failure patterns reveal account targeting, lockout activity and the shape of your user base. Limit read access to the identity and security teams that need it, and review the access list on a set schedule. Confirm whether your Grafana or equivalent tool logs dashboard access, and whether shared links or anonymous viewing are enabled.
What to watch, document and review after go-live
Once Keycloak is in production, monitoring only helps if someone has decided which signals page a person and which ones go to a dashboard. Start with sign-in outcomes. Alert on the rate of failed logins against a baseline you measured during the first weeks of live traffic, not on a fixed number copied from another system, because a normal Monday morning and a password-spraying attempt can look similar in raw counts. Keep the spike alert separate from the steady-state alert so that a sudden jump is not hidden by a high but stable background rate. Note that in the 26.8 release, login failures are persisted to the database by default. That adds write load and table growth, so confirm your database capacity and retention plan before you upgrade, and watch database write latency alongside the failure counter.
Next, decide which request latency percentiles matter to your users and track them explicitly. Many teams watch the median and the 99th percentile for token and login endpoints, but the right choice depends on your sign-in volume and your service-level commitments, so write the chosen percentiles into the monitoring standard. Pair latency with cache health. Keycloak's embedded Infinispan caches hold sessions, realm data and other state, and rising cache misses or evictions often explain slow sign-ins before anyone sees an error. Database connectivity and node availability complete the core set: alert on failed database connections, on nodes dropping out of the cluster, and on health check failures from your load balancer or orchestrator. Enable the metrics endpoint on the management interface and confirm which histograms your version exposes before you build dashboards around them.
Monitoring changes with every Keycloak upgrade. Metric names, label sets and default values can shift between releases, so a dashboard that worked on one version can show empty panels or silent alerts on the next. Before each upgrade, read the upgrade notes for metric and observability changes, then compare the scraped metric names in a staging environment against the production set. Treat that comparison as a required step in the upgrade test cycle. The Keycloak project plans four minor releases a year, so this check will recur several times annually, and it should be scheduled as routine work rather than handled as an emergency after a dashboard breaks.
Document the monitoring setup well enough that a new engineer could run it without asking the original builder. The record should cover the scrape configuration, including targets, intervals and the management interface address, and the owner of each dashboard. For each alert, record the threshold, the reason for choosing it, the expected response and a runbook that explains the first three checks to make. Runbooks should name the Keycloak logs, the database and cache views and the escalation contact. Store this documentation with the realm and client inventory so changes to either are reviewed together.
Hold a review after each minor release, and again after any change to the realm count, client count or sign-in volume. In the review, confirm that every alert still fires in staging, that thresholds still match observed traffic, that dashboard owners are current and that runbooks match the running version. Record the outcome as evidence for your operations and compliance files. Ask your support provider, or your own team, to confirm which metrics changed in the release notes and whether any default now writes new data. These reviews are the most reliable way to keep monitoring trustworthy as Keycloak evolves.
Keycloak monitoring questions buyers ask before hiring help
How much effort does monitoring add to a Keycloak rollout?
Monitoring adds a bounded amount of work on top of the rollout itself, and the size depends on how many Keycloak nodes you run and how many systems already have a metrics pipeline. The core steps are enabling the metrics endpoint on the management interface with the metrics option turned on, exposing health checks for your orchestrator, scraping the endpoint with Prometheus, and building dashboards and alert rules. Drivers that raise the effort: multiple clusters or sites, no existing Prometheus or alert routing, strict network segmentation between the management interface and the scraper, and a need to tune which HTTP and cache histograms are enabled. Ask any partner to split the estimate into configuration, dashboards, alert design and handover, so you can see which parts your team could absorb.
How long does Keycloak monitoring setup take?
Setup length depends mostly on your environments and high availability design, not on the metrics switch itself, which is a configuration change. A single development or test realm set takes far less time than a production cluster spread across availability zones, where each node, the load balancer health checks and the database connections must be observed consistently. Drivers that extend the timeline: the number of environments that need separate dashboards, whether a multi-cluster design is used, how many alert conditions must be agreed with operations, and how long change approvals take for network rules. Request a written breakdown by environment and by component, and ask which items depend on access your team has to provide.
What does monitoring require from our internal team?
Your team supplies access and decisions, and the partner or your engineers do the configuration. You will typically need Prometheus access or a place to run it, permission to create scrape targets, an alert routing destination such as your paging or ticketing tool, and named owners who decide what pages someone at night. Network changes are often the slowest item: the metrics endpoint is served on the management interface, so the scraper must reach it while public traffic does not. Plan for firewall or service mesh rules, and confirm which alerts are informational and which trigger on-call response before the first rollout.
Can our own team set up Keycloak monitoring without outside help?
Yes, a team that already runs Prometheus and understands Keycloak's deployment can usually do the work alone, and the documentation covers the metrics option, the health endpoints and the available histograms. The risk lies in the decisions around it: which login failure rates are normal for your user base, which cache signals matter during a failover test, and how alerts map to your response process. Questions to answer honestly before deciding: does anyone on the team have Prometheus operations experience, who will maintain dashboards after an upgrade, and who can test alerts against a real incident pattern. A scoped review or a short engagement can close those gaps without handing over the whole pipeline.
Does Keycloak monitoring need a separate license or subscription?
Keycloak is open source under the Apache License 2.0, and its metrics endpoint is part of the community project, so enabling it does not require a separate license. Prometheus and common alerting tools are also open source, though some hosted monitoring services charge their own fees. Red Hat build of Keycloak is Red Hat's supported distribution based on the open source project, and its subscription covers Red Hat support for the product, not a special metrics add-on. Confirm before buying: whether your chosen distribution or operator version has any changed support terms, what your hosting or observability vendor charges for storage and retention, and whether your procurement policy treats the metrics stack as a new contract. Ask the vendor for written pricing rather than relying on a general assumption.
What should we ask a partner for in a written monitoring scope?
A written scope should name every deliverable, the environments it covers, and the responsibilities on each side. Ask for the list of Keycloak nodes and clusters in scope, the metrics and health endpoints to be enabled, the Prometheus configuration and scrape targets, the dashboards and alert rules with their thresholds and owners, the alert routing setup, and the runbook for each alert. Also ask how the partner will verify the setup, such as testing an alert by inducing a controlled failure in a non-production environment, and what handover material you receive. Include what you must provide: access, network approvals, named on-call owners and a test window. DeployOpen engagements are fixed-scope, so the scope, deliverables and timeline are agreed in writing before work begins.
How should Keycloak monitoring be kept current after upgrades?
Monitoring must be reviewed as part of every Keycloak upgrade, because metric names, default behavior and recommended deployment patterns can change between releases. Keycloak plans four minor releases a year, and its upgrade notes describe behavior changes that can affect what operators see, such as changes to how login failures are stored. A practical routine: read the upgrade notes for metrics, health and database changes, test dashboards and alert rules in a staging environment against the new version, confirm scrape targets still resolve after any operator or container update, and retire alerts that no longer match real behavior. Keep the alert rules and dashboards in version control so changes are reviewed the same way application code is.
How DeployOpen scopes, builds and hands over Keycloak monitoring
DeployOpen plans, builds and hands over Keycloak monitoring inside your own cloud accounts, data centers or air-gapped networks, so your operators can see sign-in health before users report problems. Every engagement starts from a written, fixed scope that names the nodes, realms and alerts covered. Keycloak exposes Prometheus-format metrics at /metrics on its management interface when metrics are enabled, and the work connects those signals to your existing monitoring stack.
How we scope
- The written scope names which Keycloak nodes, realms and clients expose metrics and health endpoints.
- We confirm the management interface, network path and Prometheus access before any configuration changes begin.
- Scope also lists the alert set, notification channels and who owns each alert after go-live.
How we build
- Enable metrics with the metrics flag on the management interface, keeping it off public frontend URLs.
- Configure Prometheus scrape jobs and health checks for each node, then verify series appear for every instance.
- Build alert rules for login failures, request latency and cache health, tuned against a baseline from your own traffic.
How we hand over
- Handover covers the scrape configuration, alert rules and runbooks agreed in the written scope.
- Operators walk through what each alert means, who receives it and the first diagnostic steps.
- Your team receives the configuration in your own repositories, under your control.
How we support
- Ongoing support is available as a retainer covering alert tuning after go-live.
- Metric names and alert thresholds are rechecked during each Keycloak upgrade, using the upgrade notes.
- Upgrades, dependency changes and new alert requests can be handled under a retainer or a separate scope.

