Monitoring Zitadel with Prometheus and Grafana

Scrape self-hosted Zitadel metrics with Prometheus or a ServiceMonitor, alert on the signals that matter, and build Grafana dashboards, with the Login container's gap planned for.

On this page

How to monitor Zitadel with Prometheus and Grafana

Prometheus collects metrics from your self-hosted Zitadel, Alertmanager routes the alerts it raises, and Grafana turns the stored data into dashboards. Sign-in is in the path of every customer or employee who opens an application, so a slow or failing Zitadel shows up as a business outage before anyone opens a ticket. Teams need this setup once Zitadel carries production sign-in, whether for customers, partners or staff. The Login container exposes no metrics of its own, so its health has to be watched through its readiness behavior, the reverse proxy in front of it and the login and OIDC discovery endpoints from outside the cluster. This page covers scraping Zitadel with plain Prometheus configuration and with the Prometheus Operator ServiceMonitor, the signals worth alerting on, Grafana dashboards, and how to close the Login gap.

Several design decisions come before the first scrape. A Prometheus server keeps its data in a local time series database, and the Prometheus storage documentation states that local storage is not clustered or replicated. Its default retention is 15 days, so decide early whether longer history goes to remote write storage. Run Alertmanager as a cluster if alerts must survive a node failure, and point Prometheus at every Alertmanager instance, not at a load balancer. Confirm the metrics endpoint path, port and authentication requirements in the Zitadel documentation for your release before you write the scrape configuration. If the endpoint requires credentials, store them in a Kubernetes secret or a file the scrape job reads, not in plain configuration. Prometheus also values reliability over precision, so treat its counters as operational signals, not as the audit record of who signed in.

Scrape options and when each fits

This table compares four ways to get Zitadel metrics into Prometheus: static configuration, service discovery, the Prometheus Operator ServiceMonitor, and remote write to external long-term storage. Read each row for the setup that matches your platform, then check the trade-off column for what your team will maintain. The main takeaway is that the scrape method is a small decision, while retention, high availability and alert routing carry more operational weight.

OptionWhen it fitsOperational trade-off
Static scrape configurationA single Zitadel host or a small Docker Compose or binary install with fixed addressesSimple to review, but every address change or added replica requires a config edit and reload
Prometheus service discoveryKubernetes or cloud environments where Zitadel pods or instances change addresses over timeTargets follow the platform automatically, but relabeling rules must be tested so only Zitadel endpoints are scraped
Prometheus Operator ServiceMonitorClusters that already run the Prometheus Operator and deploy Zitadel with the official Helm chartScrape config is managed as a Kubernetes resource, but the Service labels and port names must match the ServiceMonitor selector
Remote write to external long-term storageRetention beyond the local default or a need to query metrics from a central store across sitesAdds a second system to run and secure, and local storage remains single-node, so the remote store needs its own availability plan
Local-only storage with a single PrometheusSmall installs where short retention and a manual restore path are acceptableLocal storage is not clustered or replicated, so a disk failure loses history unless backups are planned
Confirm the metrics endpoint and authenticationAny option, before the first scrape job goes liveConfirm with your Zitadel version whether the metrics endpoint requires authentication and which scrape credentials your team must configure

Which Zitadel signals are worth alerting on

Good alerting for Zitadel starts with knowing whether Prometheus can still see the service, then whether logins and token requests succeed, how quickly they complete, and whether the database and pods have the headroom to keep serving. The groups below connect those questions to the signals you can alert on. Set every threshold from your own baseline measured under normal load, not from a default copied from another deployment.

Scrape health and target availability

Prometheus marks a target as down when a scrape fails, and an absent series can hide an outage just as well as an error can. Alert when the Zitadel scrape target is down for a sustained period, and when the up series for each replica disappears after a deploy. Check that every pod is discovered, since a ServiceMonitor that selects only some pods leaves replicas unwatched. Prometheus values reliability over precision, so treat gaps in scrapes as a signal to investigate rather than noise to ignore.

Prometheus overview

HTTP error rate on login and token endpoints

Alert on the share of 5xx responses across the login, OIDC token and discovery paths, measured over a rolling window and split by route. A rise on the token endpoint affects every application that signs users in, while a rise on the login UI affects people who cannot sign in at all. Compare against the error rate you see on a normal weekday, and confirm which metric names your Zitadel version exposes before writing the rule, because names can change between releases.

Request latency at the edge

Track p95 and p99 latency for login and token requests, measured where traffic enters the platform, not only inside the pod. Slow token responses often trace back to the database or to a proxy that buffers or times out, so a latency alert should be paired with the database and pod signals below. Set the threshold from the latency your users accept during normal peak hours, and recheck it after every scaling change.

Database connectivity and query health

Zitadel depends on PostgreSQL for all state, so database connection failures and rising connection counts are among the earliest warnings of a wider outage. Alert on failed connections and on connection pool saturation reported by the Zitadel service, and watch the PostgreSQL side for connection limits and long-running queries. Confirm the metric names with the PostgreSQL exporter you run, because Zitadel and the database expose different series.

Readiness and pod restarts

A pod that fails its readiness check stops receiving traffic, and a pod that restarts repeatedly shows a crash loop that often follows a bad configuration or a failed schema migration. Alert on readiness failures that persist beyond a deploy window and on restart counts increasing for the same pod. Pair this with the readiness and health probe settings you chose, so an alert does not fire on expected startup behavior during a rolling upgrade.

CPU, memory and disk pressure

Resource limits decide whether Zitadel is throttled or killed, and the database host decides how quickly writes complete. Alert on sustained CPU throttling, memory approaching the container limit, and free disk space on the PostgreSQL volume falling toward a level your write volume cannot absorb. Size each threshold from observed usage, and confirm the container and node metrics your cluster exports before you depend on them in alert rules.

Why the Login container exposes no metrics

The hosted Login container, which serves the sign-in pages users see during authentication, does not expose a metrics endpoint. A Prometheus scrape job pointed at it returns nothing useful, so a dashboard can show Zitadel as healthy while users cannot finish signing in. Before you write any scrape config, confirm with Zitadel for your version whether the Login deployment exposes any metrics port in the chart or Compose file you deploy, and whether that is expected to change. Check the self-hosting overview and the release notes for the version you run, and record the answer in your monitoring runbook.

Because the Login container is silent, close the gap from two directions. First, add black-box probes that request the login URL and the OIDC discovery document (the /.well-known/openid-configuration path on your Zitadel domain) from outside the cluster, through the same load balancer, proxy and TLS certificate that users reach. Check the HTTP status and a stable string in the response, not only whether the port is open, because a proxy can return a 200 page for a backend that is down. Second, watch the Zitadel-side signals that show whether logins are reaching the API, such as request rates and error codes on the API paths, and the readiness results covered in the health probes section.

Make three decisions and write them down. Choose where the probes run: a vantage point outside the cluster catches routing and certificate failures that in-cluster checks miss. Choose the alert rule: a probe failing on several consecutive runs is a better page than a single failed check, because a brief blip during a rolling restart should not wake the on-call engineer. Choose an owner for the login SLI and review it after each Zitadel upgrade, since the login path and its supported signals can change between releases. Ask Zitadel for the supported monitoring surface of your version before you treat the probe as the only login signal.

Setting up Zitadel metrics in Prometheus and Grafana

This sequence takes a self-hosted Zitadel instance from an unmonitored deployment to scraped metrics, stored history, alert rules and Grafana dashboards that are managed as code. Each step ends with a check that tells the operator whether the step is complete.

  1. Confirm the metrics endpoint is enabled and protected

    The platform team checks the Zitadel configuration or Helm values to confirm that the metrics endpoint is turned on and that it is not reachable from untrusted networks. Metrics can reveal internal topology and version details, so the endpoint should sit on a private interface or behind authentication, as your network policy requires. Confirm the exact configuration keys and the metrics path against the Zitadel self-hosting documentation for your release, since these settings change between versions. Check: a request from the Prometheus host succeeds, and the same request from an outside network fails.

  2. Create the scrape target or ServiceMonitor

    Platform engineers define how Prometheus finds Zitadel. On a virtual machine or Docker host, add a static or file-based scrape job that lists each Zitadel instance. On Kubernetes with the Prometheus Operator, create a ServiceMonitor that selects the Zitadel service and names the metrics port and path. Use service discovery where possible, since Prometheus collects metrics by pulling them over HTTP from targets it finds through discovery or static configuration. Check: the configuration passes promtool validation and the job appears in the Prometheus configuration page after a reload.

  3. Verify that every target is up

    The operator opens the Targets page in the Prometheus web interface and confirms that each Zitadel pod or host shows a state of up with a recent last scrape time. Any target that is down usually points to a network policy, a wrong port or path, or an authentication setting from the previous step. Run a simple query such as up with the Zitadel job label to confirm samples are arriving. Check: every expected Zitadel replica is listed and returns a value of 1 for the up metric.

  4. Set retention and plan local storage

    The platform team decides how long Prometheus keeps data locally and how much disk to allocate. Prometheus stores data in a local time series database organized into two-hour blocks with a write-ahead log, and its default retention is 15 days, which can be configured by time or size. Local storage is not clustered or replicated, so it should be backed up or paired with remote write to external long-term storage if the organization needs longer history for security investigations or audits. Ask your storage team how disk capacity is provisioned and monitored. Check: the configured retention flags are visible in the running process, and disk usage is being graphed.

  5. Define alert rules and route them to every Alertmanager

    The operator writes alert rules for signals that show whether Zitadel is serving logins and token requests, such as target loss, sustained error rates and readiness failures, and sets severity labels the on-call team understands. Alertmanager handles grouping, inhibition and silences, so Prometheus should be configured to send alerts to every Alertmanager instance rather than to a load balancer in front of them. If Alertmanager runs as a cluster, enable the cluster settings described in its documentation. Check: a deliberately stopped test target fires the expected alert, and the notification arrives through the configured receiver.

  6. Build or import Grafana dashboards

    The team creates a Grafana dashboard that shows Zitadel request volume, error responses, latency and target health, using the Prometheus data source. Starting from a community dashboard is faster, but each panel should be checked against the metric names exposed by your Zitadel release, because names can change between versions. Confirm that Grafana's own production database is PostgreSQL or MySQL, since SQLite is not recommended for production. Check: each panel returns data for the Zitadel job, and the dashboard shows the same values as a direct PromQL query.

  7. Provision data sources and dashboards as code

    The platform team stores the Prometheus data source definition and the dashboard JSON in version control and loads them at Grafana startup using its provisioning files, so a rebuilt Grafana instance does not depend on manual clicks. Grafana also documents other as-code options, including Terraform and Git Sync, which teams can evaluate against their change process. Restrict edits to provisioned dashboards so that changes go through review. Check: a fresh Grafana container started from the repository shows the data source and dashboard without any manual steps.

  8. Secure the Grafana and Prometheus access paths

    Before handing the dashboards to operators, the security team reviews access to both tools. Grafana's hardening guidance covers secure and SameSite cookies, a Content Security Policy, hiding the version from unauthenticated users, and authenticating the metrics endpoint, and the Prometheus security model describes the trust assumptions for its HTTP interfaces. Confirm which identity provider Grafana uses for sign-in, noting that SAML and SCIM are limited to Grafana Enterprise and Grafana Cloud in the documented authentication options. Check: an unauthenticated request to the Grafana and Prometheus interfaces is refused, and the review record names the people who approved access.

How metrics, alerts and dashboards connect

The diagram starts with Zitadel and its Login container, which exposes no metrics, so monitoring of the login path relies on probes and proxy or access signals instead. Prometheus pulls metrics from the Zitadel API endpoint, evaluates alerting rules locally, and hands firing alerts to Alertmanager, which must be reached at every instance. Grafana reads from Prometheus for dashboards, and a remote write path can forward samples to long-term storage. Check each hand-off separately, because a silent break in scraping or in Alertmanager delivery will not show up as an error on the dashboard.

Metric scraping, rule evaluation, alert routing and dashboard reads for Zitadel.

Securing the metrics endpoint and monitoring stack

The monitoring stack holds a detailed view of your identity provider, so it needs the same care as the system it watches. The cards below cover who can read Zitadel metrics, how Prometheus, Alertmanager and Grafana are exposed, and what personal data must stay out of labels and dashboards. Work through them before the monitoring stack reaches production.

Restrict the metrics endpoint

Zitadel's metrics endpoint should not be reachable from the public internet or from the login path that users hit. Limit scraping to the Prometheus servers or the Prometheus Operator's scrape pods, using network policy, a private listener or proxy rules at your ingress. Confirm in your own deployment which routes the public proxy forwards, since a metrics path that is accidentally exposed through the same host as the login pages can leak internal detail about your instance.

Self-hosting docs

Authenticate scrape traffic

Where the metrics endpoint supports authentication, configure Prometheus to present credentials and store them as Kubernetes secrets or mounted files, not inline in scrape configs. Confirm with Zitadel's documentation which authentication options your release supports and how they are configured. Rotate the scrape credential on the same schedule as other service credentials, and test that a scrape fails when the credential is wrong.

Keep Prometheus and Alertmanager private

Prometheus has no built-in authentication for its own web interface or API, so place it behind a private network boundary or an authenticating proxy. Alertmanager needs the same treatment, since its API can create silences that hide alerts. Prometheus should send alerts to every Alertmanager instance directly, not through a load balancer, so review the target list whenever you change the Alertmanager topology.

Prometheus security model

Treat Prometheus storage as a single node

Local Prometheus storage is not clustered or replicated, so losing the volume loses the metric history. Decide whether you need a backup of the data directory, a remote write target for long-term storage, or both, and write down the recovery expectation for each. Size the volume and retention together, and remember that the default retention is 15 days. Restoring metrics history is rarely the priority during an incident, but alert rules and their configuration must be recoverable from version control.

Prometheus storage docs

Harden Grafana access

Grafana stores its configuration in a database, so run it on MySQL or PostgreSQL for production rather than the default SQLite. Enable secure and SameSite cookies, a Content Security Policy, and hide the Grafana version from unauthenticated users. Use an SSO method such as generic OAuth or Entra ID for operators, and check which features, including SAML and SCIM, your Grafana edition supports before you plan the identity integration. Confirm each setting against the hardening guide for your version.

Grafana hardening guide

Keep personal data out of labels

Prometheus labels become part of every series identifier, so a label carrying a user name, email address or tenant user ID creates both privacy exposure and high cardinality. Review Zitadel metrics for labels that include identifiers, and drop or relabel them at scrape time where needed. Apply the same rule to Grafana dashboards, panel titles, saved queries and annotations, and restrict who can view dashboards that show per-organization breakdowns.

Questions teams ask about monitoring Zitadel

What does it cost to monitor Zitadel with Prometheus and Grafana?

The software itself has no license fee for self-hosting, so the cost comes from infrastructure, storage, implementation effort and the people who run the stack. Prometheus is licensed under Apache-2.0 and has no paid enterprise edition. Grafana is AGPLv3 for the open-source edition, with a commercial Enterprise option. Effort rises with the number of Zitadel instances, the alert routing you need, whether you run high availability for Prometheus and Grafana, and how many dashboards and runbooks your teams expect. Ask any partner for a quote that lists each component, who builds it, who maintains it, and what recurs each month, such as storage growth and upgrade work.

How long does a baseline Zitadel monitoring setup take?

No duration is fixed for this work, and the answer depends on what already exists in your environment. A team that already runs Prometheus, Alertmanager and Grafana can add a Zitadel scrape target, a short set of alert rules and a dashboard in less time than a team starting from zero. Factors that extend the work include creating the metrics endpoint access rules, sending alerts to your paging tool, connecting Grafana to your identity provider, and agreeing on which signals matter to your on-call team. Ask for a written scope that lists the targets, alert rules, dashboards and handover steps before work starts.

What must our team provide before monitoring work begins?

Your team should provide access to the Kubernetes cluster, Helm release or Compose host where Zitadel runs, plus read access to its metrics endpoint configuration. You also need an existing Prometheus or Prometheus Operator installation, or a decision to install one, and a place for Grafana to run with a database that suits production. Name the people who receive alerts, the paging tool and the escalation path. Finally, provide the list of service level targets your business cares about, because alert thresholds should follow those targets rather than default values. Confirm each item against your own environment before the scope is signed.

Can our own team set up Zitadel monitoring without a partner?

Yes, a capable platform team can do this internally, provided it has experience running Prometheus and can read Zitadel's documentation for its metrics. The Prometheus Operator ServiceMonitor approach fits teams already running Kubernetes, while static scrape configuration fits simpler hosts. The parts that most often take longer than expected are the alert design, keeping Prometheus storage and retention sized correctly, and making sure the Login container, which exposes no metrics, is covered by probes and log-based checks instead. A partner is useful when the team lacks time, wants an outside review of alert quality, or needs the work documented for an audit.

Is Prometheus or Grafana free to use, and where do the costs come from?

Prometheus is licensed under Apache-2.0 and has no paid enterprise edition, so the project itself costs nothing to use. Grafana relicensed Grafana, Loki and Tempo from Apache License 2.0 to AGPLv3 on April 20, 2021, according to Grafana Labs, and offers Grafana Enterprise as a commercial, non-AGPL option. Real costs appear in the surrounding work: servers or nodes, disk for time series storage, backups, Grafana's production database (MySQL or PostgreSQL, since SQLite is not recommended for production), staff time for alert tuning, and upgrades. Review the Grafana licensing page with counsel if your use case depends on AGPL obligations.

How does Grafana Cloud compare with running Grafana ourselves?

Grafana Cloud is a hosted service with a free tier, a Pro tier that starts with a 19 US dollar monthly platform fee plus usage, and an Enterprise tier with a minimum commitment of 25,000 US dollars per year, according to the Grafana pricing page. Hosting Grafana yourself keeps metrics and dashboards inside your infrastructure, which matters when your data residency or access rules require it, but you then own high availability, database backups, patching and the Prometheus storage itself. Cloud reduces that operational load while sending telemetry to a third party. Compare total monthly usage, data residency terms and the staff time each option needs, and check the current pricing page before deciding.

Does Zitadel's Login container expose metrics, and how do we cover it?

The Login container does not expose metrics, so Prometheus cannot scrape it the way it scrapes the main Zitadel service. Cover it with the separate signals available for that component: uptime checks on the login page, readiness and health probes, and access and runtime logs collected from stdout. Confirm the exact endpoints and probe paths against Zitadel's current self-hosting documentation for your release, because these details change between versions. A monitoring design should state clearly which signals come from metrics and which come from probes or logs, so on-call engineers know where to look during a login outage.

How DeployOpen scopes and delivers Zitadel monitoring

DeployOpen approaches Zitadel monitoring as a written, fixed-scope piece of work inside your infrastructure. We agree which metrics, alerts and dashboards are in scope, build them on your Prometheus and Grafana, and hand over documentation your operations team can run without us.

How we scope

  • Inventory your existing Prometheus, Alertmanager and Grafana setup, and confirm which Zitadel endpoints your team can reach from them.
  • Agree in writing which signals, alert routes and dashboards are included, and which are left to your own team.
  • Confirm how your Zitadel runs (Kubernetes with the Helm chart, Docker Compose or binaries) and where the Login container sits, since it exposes no metrics of its own.

How we build

  • Configure scraping through a ServiceMonitor or static Prometheus configuration, and verify each target appears and returns data.
  • Write alert rules for the agreed signals and test each one against a known condition before it goes live.
  • Provision Grafana dashboards and data sources as code so they can be reviewed, versioned and reloaded consistently.

How we hand over

  • Deliver the scrape configuration, alert rules, dashboard definitions and an alert routing description in your own version control.
  • Document each alert with its meaning, the expected response and the owner, so on-call staff can act without the original builders.
  • Walk your operations team through the setup and the retention, storage and access decisions they will need to maintain.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing of the monitoring stack are available as a retainer.
  • Ask for a written quote that lists each deliverable, what your team must provide and which upgrade work is included.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.