Monitoring Metabase with Prometheus

Prometheus monitoring for self-hosted Metabase: which metrics port to expose, what to scrape, how to alert on thread and connection exhaustion, and what your team must run.

On this page

Prometheus monitoring for Metabase: what to expose and where

An operations lead who has seen a self-hosted Metabase slow down or stop without warning needs signals that show the problem building. Metabase can expose metrics for Prometheus to pull, and the real work is choosing which signals to watch, placing the scrape so the metrics endpoint is reachable from Prometheus, and setting alerts early enough to act before thread or connection exhaustion becomes an outage. The Metabase Prometheus example separates three ports: port 3000 serves Metabase itself, port 9191 serves metrics when MB_PROMETHEUS_SERVER_PORT is set to that value, and port 9090 serves Prometheus. Keeping the metrics listener on its own port lets you restrict scraping to Prometheus at the network layer rather than exposing it alongside user traffic. Confirm the exact variable behavior and the metric names against the current Metabase observability documentation for your release before you write scrape configuration.

Prometheus is licensed under Apache-2.0, so the software itself has no license fee. The costs fall on the infrastructure that stores and queries time series, the storage that holds retained data, the implementation work to configure scrapes, dashboards and alert rules, and the people who keep the monitoring stack running. Prometheus local storage is not clustered or replicated, so a single Prometheus server is a single point you must manage, and alerting depends on Alertmanager, which needs its own high availability design. Decide early whether your team has the capacity to own these pieces on call. If it does not, or if Metabase is one of many systems you need to monitor with a shared stack, a partner can plan the scrape design, alert set and runbooks as a fixed-scope piece of work, and your team keeps ownership of the alerts it will act on.

How Metabase, Prometheus and Alertmanager fit together

The diagram starts with users reaching Metabase on port 3000, the public-facing application port. Metabase also exposes a metrics endpoint on the port set by MB_PROMETHEUS_SERVER_PORT, which the Metabase docs example sets to 9191. Prometheus, running on port 9090, pulls from that endpoint and stores samples on local disk or forwards them through remote write to long-term storage. Prometheus then sends alerts to Alertmanager. Check that the metrics port is reachable by Prometheus but not exposed to users, and that Prometheus points at every Alertmanager instance. Addresses and ports are illustrative and depend on your environment.

Illustrative layout from the Metabase docs example, with the metrics path kept off the user-facing port.

Configuration options and when each one fits

This table compares the main choices for a Metabase Prometheus setup, from the metrics port and scrape placement to retention, remote storage and Alertmanager topology. Read each row for the condition that makes an option fit and the trade-off you accept by choosing it.

DecisionWhen it fitsTrade-off
Metrics port (MB_PROMETHEUS_SERVER_PORT, example port 9191)Use a separate port from the Metabase web port (3000 in the example) so scrapes and metrics stay off user-facing listenersKeep the port reachable only from Prometheus; anyone who can reach it can read internal metrics, so restrict it at the network layer
Scrape targets via static configurationSmall, fixed deployments with a few known Metabase nodes that change rarelyEvery host change needs a config edit and reload; easy to forget a node after scaling
Scrape targets via service discoveryOrchestrated or frequently changing hosts where nodes are added and removed automaticallyMore moving parts to configure and verify; labels must be checked so the right targets are scraped
Local retention by time (default 15 days)Dashboards and alerts that only need recent history for day-to-day troubleshootingOlder data is deleted; capacity planning or trend reviews beyond the window need another store
Local retention by sizeHosts with a fixed disk budget where storage must not fill the volumeOldest data is dropped when the size limit is reached, which can hide history sooner than expected
Remote write to external long-term storageTeams that must keep metrics for longer periods or query them across several Prometheus serversAnother system to run and pay for; local storage is not clustered or replicated, so the remote system carries durability
Single AlertmanagerSingle team, one site, and an acceptable risk that alert routing stops if that instance failsNo built-in failover; a single outage silences notifications until it is restored
Alertmanager cluster (--cluster flags)Alerts must keep flowing during an Alertmanager node failure and on-call depends on themMore configuration to run and verify. Point Prometheus at every Alertmanager instance, not at a load balancer

Which Metabase signals to watch for exhaustion

Exhaustion rarely shows up as a single failure. Memory pressure, thread growth, connection waits and slow requests tend to build together, so the cards below group the signals you should scrape and alert on. Confirm every metric name against what your Metabase version exposes on its metrics endpoint before writing a rule.

JVM memory and garbage collection

Metabase runs as a JVM process, so heap usage and garbage collection activity are the first place sustained load appears. A heap that stays near its limit while collection runs more often and pauses longer usually means queries, caching or sync work are outgrowing the memory you allocated. Check heap used against the configured maximum over a full business day, and alert on sustained high occupancy rather than brief spikes. Confirm the exact JVM metric names exposed by your Metabase version on the documented endpoint.

Prometheus docs

Thread count and thread pool activity

Metabase serves web requests and runs query and background work on threads, and a thread count that climbs without falling back is a common precursor to unresponsive pages. Watch live thread totals alongside the number of threads in waiting or blocked states, since a growing blocked share points to a downstream stall such as a slow warehouse or a locked database. Compare thread trends after each deployment or upgrade. Confirm which thread and pool metrics your version publishes before building dashboards around them.

Database connection pool usage

Metabase keeps pooled connections to its application database and to each analytics source, and pool exhaustion shows up as queries waiting for a free connection. Track active, idle and waiting connections per pool, and alert when waiting connections stay above zero for a sustained period. A pool that is always full often signals that too many concurrent dashboards or syncs share one source, not that the pool is too small. Confirm the pool metric names and labels for your build, and record the pool limits you set so alerts have a baseline.

HTTP request volume and latency

Request rate and response time show what users and embedded applications actually experience. Rising latency at steady request volume suggests a backend bottleneck, while rising volume with flat latency points to growth in demand. Use percentile latency rather than averages, because a small share of very slow dashboard loads can hide behind a healthy mean. Split the view by status code so server errors stand out from normal traffic. Confirm which HTTP metrics the endpoint exposes and whether they are labeled by route.

Job and sync activity

Scheduled database syncs, field value scans, subscriptions and alerts run as background jobs that compete with interactive users for threads, memory and warehouse capacity. A job backlog or a sync that overlaps the next scheduled run is a frequent cause of exhaustion that appears only during peak hours. Correlate job timing with the thread and connection signals above to see whether background work is the trigger. Confirm which job or task metrics your version exposes, or whether you need to derive timing from application logs.

Scrape health and the up signal

The up series that Prometheus records for each target tells you whether the last scrape succeeded, which is the simplest liveness check for the metrics endpoint itself. A missing or zero value can mean Metabase is down, the metrics port is blocked, or the scrape configuration is wrong, so alert on it separately from application metrics. Remember that Prometheus pulls from the target, so a firewall rule between the two hosts can look like an outage. Check the metrics port setting against your scrape target before assuming Metabase has failed.

Setting up Prometheus monitoring for Metabase step by step

This sequence takes a self-hosted Metabase from an unmonitored instance to one where Prometheus scrapes its metrics on a restricted port, retains data sized for your environment and sends tested alerts through Alertmanager. Each step ends with a check so you know it worked before moving on.

  1. Confirm the Metabase version and metrics documentation

    Check which Metabase version you run and read the Observability with Prometheus page in the Metabase docs for that version, since the metrics setup and variable names are documented there. Confirm that your version supports the Prometheus metrics endpoint and note the metric names it documents. Your check is a written record of the version, the docs page you followed and the port the docs describe for metrics. Record the Metabase edition too, because it determines which plan features your team can rely on, though the metrics endpoint itself is not tied to a paid plan in the facts supplied.

  2. Set the metrics port with MB_PROMETHEUS_SERVER_PORT

    Set the environment variable MB_PROMETHEUS_SERVER_PORT on the Metabase process, for example in your container definition, systemd unit or Kubernetes manifest. In the Metabase Prometheus example, the metrics port is 9191, while port 3000 serves Metabase itself and 9090 serves Prometheus. Keep those roles separate in your plan. Restart Metabase, then confirm the application still answers on its normal port and that the metrics port is listening on the host. The check is a successful health response on port 3000 and an open listener on the metrics port.

  3. Restrict the metrics port to the monitoring network

    Limit access to the metrics port so only the Prometheus server and approved administrators can reach it. Apply this with host firewall rules, security groups, network policies or a private subnet, depending on where you run Metabase. Metrics can reveal operational detail about your instance, so do not publish the port through a public load balancer or reverse proxy. Your check is a connection attempt from an unapproved host that fails, and a connection from the Prometheus host that succeeds.

  4. Deploy Prometheus with a scrape job for Metabase

    Deploy Prometheus on infrastructure you control and add a scrape job that targets the Metabase host and metrics port, either as a static target or through your service discovery. Give the job a clear name so queries and alerts can filter on it. Prometheus pulls metrics over HTTP, so the Prometheus server must be able to reach the target. Your check is the Prometheus configuration validating without errors before you start or reload the server.

  5. Verify the target is up and returning metrics

    Open the Prometheus web interface and check the Targets page to confirm the Metabase job reports the target as up. Then run a simple query on a metric name documented for Metabase to confirm samples are arriving. If the target is down, check the port restriction from the previous step, the target address and whether Metabase is listening on the metrics port. Your check is a target in the up state and a query that returns recent samples for the Metabase job.

  6. Set retention and storage sizing

    Decide how long Prometheus keeps data and how much disk it may use. Prometheus stores data locally in two-hour blocks with a write-ahead log, and its default retention is 15 days, configurable by time or size. Local storage is not clustered or replicated, so treat the Prometheus data directory like any single-node database with its own backup and disk monitoring. If you need longer history, look at remote write to external long-term storage. Ask your storage team to confirm capacity for your series count. The check is a retention setting you can point to in the configuration and a disk usage figure you have compared against your capacity.

  7. Connect Alertmanager with every instance listed

    Point Prometheus at each Alertmanager instance in your alerting configuration, not at a load balancer in front of them. Alertmanager handles grouping, inhibition and silences, and it can run as a cluster for high availability using its cluster flags. Confirm that Prometheus shows each Alertmanager as active on its status page. The check is every Alertmanager endpoint listed and reported as up, and a test notification route configured for the team that will receive pages.

  8. Test each alert with a controlled condition

    Write alert rules for thread and connection exhaustion and for target availability, then trigger each one under a controlled condition before relying on it. For example, you can stop the Metabase target briefly in a test environment to confirm the down alert fires and reaches the right receiver, and lower a test threshold to confirm the rule evaluates. Record what you tested, the time the alert fired and the notification received. Repeat the test after each change to the rules or routes. The check is a documented test result for every alert, with a clean resolution notice when the condition clears.

Where Prometheus runs next to Metabase

When Metabase runs on one virtual machine or bare-metal server, the most common pattern is to run Prometheus on a separate monitoring host rather than alongside the application. That separation means a failure or memory spike on the Metabase JVM does not also take down the process that is supposed to report it. The metrics listener is set with MB_PROMETHEUS_SERVER_PORT, and Prometheus scrapes it over the private network. Because a single Prometheus instance is not clustered or replicated, the monitoring host should be managed like any other single-node database: patched on a schedule, backed by disk monitoring and covered by its own backup of configuration.

  • Host ownership: Confirm whether the platform team or the application team owns the monitoring host, and who gets paged when it fails.
  • Network path: Allow Prometheus to reach the metrics port on the Metabase host, and keep that port off public interfaces.
  • Storage: Size local disk for the default 15-day retention or the retention you configure by time or size.
  • Failure impact: If the monitoring host is lost, the metrics history since the last copy is lost with it, so decide whether that matters for your audit trail.
  • Access: Restrict who can query the Prometheus web interface, since it exposes operational detail.

Check that the monitoring host sits in a different failure domain from Metabase, so a single host outage does not hide both the application and its alerts.

Alerting on Metabase thread and connection exhaustion with Prometheus

Design alerts on sustained saturation rather than single spikes. A thread pool or connection pool that touches its ceiling for a few seconds during a heavy dashboard refresh is normal behavior, and an alert that fires on it teaches the on-call team to ignore the channel. Instead, pair a saturation signal (how many threads or database connections are in use relative to what the instance can hand out) with a condition that lasts longer than a normal burst, and add a latency or error signal that shows users are already affected. The saturation alert warns you early, and the latency or error alert confirms that the warning matters. Use the exact metric names exposed by your Metabase version on the metrics port set by MB_PROMETHEUS_SERVER_PORT, which the Metabase Prometheus documentation describes, and confirm them against your own /metrics output before writing any rule.

Threshold values and evaluation windows must come from your own baseline, not from a template. Run Metabase under representative load for several weeks, record normal peaks for each pool, and set the threshold above those peaks with a for duration that matches how long a real backlog takes to hurt users. Prometheus stores data in local two-hour blocks with a default 15-day retention, so you can review the baseline in the same server you use for alerting, but that server is not clustered or replicated. Prometheus values reliability over precision and is not a good choice where 100% accuracy is required, so treat these alerts as operational signals, not as an exact record of every query. Ask whoever owns the Metabase instance to confirm how pool sizes are configured in your deployment before you choose the numbers.

Route alerts through Alertmanager, which groups related notifications, applies inhibition so a database outage does not produce a flood of Metabase alerts, and supports silences for planned maintenance such as upgrades. Point Prometheus at every Alertmanager instance rather than at a load balancer, and if you run Alertmanager as a cluster, use its --cluster flags as the Alertmanager documentation explains. Before relying on any alert, test it in a non-production Metabase by inducing the condition, for example with a deliberately slow warehouse query run in bulk, and confirm that the alert fires, reaches the right receiver, resolves when load drops, and is silenced during a planned upgrade window.

Security considerations for Prometheus monitoring for Metabase

Monitoring adds its own attack surface to a Metabase deployment: an open metrics port, a time series store full of operational detail, a query interface, and alert channels that carry credentials. The cards below cover five risks to decide on before the scrape configuration goes live, and each one names a check to run in your own environment.

Metrics port exposure

The metrics endpoint enabled by MB_PROMETHEUS_SERVER_PORT (9191 in Metabase's example) is a separate listener from the web application on port 3000. Confirm that it binds only to the network interface your Prometheus server uses, and that firewall rules block it from user networks, the internet and any shared subnet. Test reachability from outside the monitoring segment rather than assuming the rule works.

Metabase Prometheus docs

Sensitive detail in labels

Metric names, labels and values can reveal information even when no query results are present. Review which labels your scrape and relabeling rules keep, and avoid adding user names, email addresses, database names or query text as labels. High-cardinality labels also raise storage cost. Ask your team to document the label set so reviewers can confirm what the metrics disclose.

Prometheus UI and API access

The Prometheus web UI and HTTP API let anyone who can reach them run PromQL queries against all stored metrics and view configuration. The project does not provide built-in user authentication for these endpoints, so place them behind a reverse proxy or an access layer that enforces your identity model. Limit administrative endpoints and restrict who can reload configuration.

Prometheus security model

Alertmanager receiver credentials

Alert receivers such as email, chat and paging integrations often hold webhook URLs, SMTP passwords or API tokens in the Alertmanager configuration. Store those values in a secrets mechanism your organization already uses, restrict read access to the configuration file, and rotate tokens when staff change roles. Check that alert payloads sent to chat channels do not expose more Metabase detail than the responders need.

Patching Prometheus and Metabase

Prometheus and Metabase both need a patch owner with a schedule. Prometheus minor releases stop receiving bug fixes after 6 weeks, and LTS lines receive fixes for one year, so pin to a supported line and track releases. Metabase publishes its own end-of-life dates, and upgrades should be tested against the monitoring configuration. Record which versions are running in each environment.

Prometheus release cycle

Questions buyers ask before monitoring Metabase with Prometheus

What does it cost to monitor Metabase with Prometheus?

Prometheus itself is licensed under Apache-2.0 and has no paid enterprise edition, so the cost comes from four places: the hosts and storage that run Prometheus and Alertmanager, the time series retention you choose, the implementation work, and the people who run the stack afterwards. Infrastructure and storage recur every month and grow with the number of targets, scrape frequency and retention period. Implementation is usually a one-time cost, while on-call ownership, rule maintenance and upgrades recur. Ask any partner for a quote that splits these components so you can see what is one-time and what continues after handover.

How long does a Prometheus setup for Metabase take?

The duration depends on what already exists in your environment. A team that already runs Prometheus and Alertmanager mainly needs a scrape job, a metrics port and alert rules. A team starting from nothing also needs host sizing, service discovery or static targets, retention and remote storage decisions, and alert routing to real receivers. Other factors include how many Metabase instances or clusters you run, whether the metrics port is reachable from your Prometheus network, and how many alerts must be tested against real incidents. Ask for a written scope that lists each of these items before agreeing a timeline.

What must our team provide for Prometheus monitoring of Metabase?

Your team needs to provide the following before the work starts:

  • Hosts for Prometheus and Alertmanager, sized for your target count and retention, in a network you control.
  • Network rules that allow Prometheus to reach the Metabase application port and the metrics port set by MB_PROMETHEUS_SERVER_PORT, and that keep the metrics port away from public networks.
  • Alert receivers such as your paging, chat or ticketing tools, with test credentials.
  • A named on-call owner for each alert, who accepts the runbook and the escalation path.

Without these, the monitoring stack can be installed but alerts will not reach anyone who acts on them.

Can one internal engineer set up Prometheus monitoring for Metabase alone?

One engineer who already knows Prometheus, Alertmanager and Metabase's JVM can usually complete the setup, but the work is rarely finished by one person. Setup touches networking, the metrics endpoint, dashboards, alert thresholds and receiver integrations, and each needs review by someone who owns the on-call process. The main risk is a single person holding the knowledge of thresholds and runbooks. A reasonable test is whether a second engineer can read the configuration, explain each alert and respond to a test alert without help.

Which Metabase metrics and alerts should we watch first?

Start with the signals that show exhaustion before users notice. For Metabase, that means JVM heap and garbage collection pressure, thread counts, and database connection pool usage, along with whether the metrics endpoint itself stays up. Define alert thresholds from your own baseline during a normal week rather than from a generic number, and test each alert by simulating load in a non-production instance. Confirm the exact metric names against the Metabase Prometheus documentation for your version, because the names are the part most likely to change between releases.

How do Metabase upgrades affect our Prometheus setup?

A Metabase upgrade can change metric names, the metrics endpoint behavior or the JVM settings your dashboards depend on, so each upgrade should include a check of your scrape job and alert rules in a test environment. Metabase LTS versions are supported for 14 months, while non-LTS versions usually reach end of life after 2 months, so the release you pick sets how often you revisit this work. On the Prometheus side, LTS 3.13 is supported until July 31, 2027, and Prometheus minor releases receive bug fixes for only about six weeks, so plan a regular upgrade window for both products together. Confirm current dates on the Metabase version support page and the Prometheus release cycle page.

Does Prometheus monitoring replace the need for an on-call rota?

No. Prometheus collects metrics and evaluates alert rules, and Alertmanager routes the resulting alerts, but neither decides who responds or what they do. You still need an on-call schedule, runbooks for each alert, and an escalation path when the monitoring stack itself fails. Prometheus local storage is not clustered or replicated, so treat the Prometheus host as a single-node database that needs its own health alerts. Alertmanager can run as a cluster for high availability, and Prometheus should point at every Alertmanager instance rather than a load balancer. Confirm these choices with your operations team before go-live.

Limits to confirm in your environment before go-live

Prometheus and Metabase monitoring work well only when the metric names, thresholds, retention and alert paths match how your instance really runs. The cards below list the items to confirm with your Metabase and Prometheus contacts before you rely on dashboards or pages. Each one is a decision you own, not a default you inherit.

Metric names for your version

Metric names and labels are tied to the Metabase version you run, so the names in your dashboards and alert rules must be checked against that exact release. Ask your Metabase contact which metrics the metrics port exposes on your build, what each one counts, and whether any were renamed during upgrades. Then scrape the endpoint once and confirm every expression in your rules returns data. Confirm names before writing any alert.

Prometheus docs

Thresholds that fit your load

Thread and connection alert thresholds depend on pool sizes, user count, query mix and warehouse behavior, so a value copied from another deployment will either page constantly or miss real exhaustion. Ask your Metabase contact for the connection pool and thread settings in your environment, and ask who owns the baseline. Measure normal peaks over several weeks before you set limits, and record the reasoning next to each rule.

Retention against reporting needs

Prometheus keeps local data for a default period, and that window decides how far back you can compare load, incidents and upgrade effects. Ask your Prometheus contact whether retention is set by time or size on your servers, and whether your audit or capacity reviews need longer history. If they do, plan remote write to external long-term storage now rather than after data is gone.

Default retention
15 days
Prometheus storage

No clustering in local storage

Local Prometheus storage is not clustered or replicated, so one server failing means a gap in metrics and alerts for that period. Ask your platform team who runs the Prometheus host, how it is backed up, and how a second instance or remote storage will cover outages. Decide whether a missed scrape is acceptable for Metabase monitoring or whether a second scraper is required.

Alertmanager high availability design

Alertmanager can run as a cluster, but only when Prometheus is configured to send alerts to every instance rather than through a load balancer. Ask your monitoring owner how many Alertmanager instances run, how cluster peers are configured with the cluster flags, and who receives a page if the notification path itself fails. Test an alert end to end, including a deliberately silenced or stopped instance, before go-live.

Alertmanager docs

Prometheus release cycle planning

Prometheus starts a new minor release every six weeks, and a minor release generally stops receiving bug fixes after that window, so an unplanned version stays exposed. Ask your platform contact which release line you run, whether it is the long-term support line, and who schedules upgrades and tests them against your Metabase dashboards and alert rules. Put the upgrade cadence on the operations calendar before go-live.

Minor release cycle
6 weeks
Release cycle

How DeployOpen scopes and supports Metabase monitoring

DeployOpen plans, builds, documents and supports Prometheus monitoring for a self-hosted Metabase inside infrastructure you control. The work starts with a written scope that names the metrics, ports, alert rules and owners before any configuration changes are made.

How we scope

  • We confirm your Metabase version, edition and hosting model before choosing how metrics are exposed.
  • The written scope lists the scrape targets, the metrics port, network paths and who can reach them.
  • Alert thresholds for thread and connection exhaustion are agreed with your operations team in writing.
  • Engagements are fixed-scope, so deliverables and timelines are agreed before work starts.

How we build

  • We configure the Metabase metrics endpoint and the Prometheus scrape job in your environment.
  • We set up Prometheus storage, retention and any remote write target you specify in the scope.
  • Alert rules and Alertmanager routing are built and then tested against controlled load conditions.
  • We check that dashboards and alerts fire as intended before the monitoring stack is accepted.

How we hand over

  • You receive documentation of scrape configuration, ports, firewall rules and alert rule definitions.
  • A runbook describes what each alert means and the first checks an on-call engineer should run.
  • Your team is walked through the setup so operators can change thresholds and add targets safely.
  • Upgrade notes describe how the monitoring stack is updated alongside Metabase and Prometheus releases.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Retainer support can cover Metabase and Prometheus version changes, including LTS and minor release cycles.
  • Periodic reviews check that alert rules still match current load, user counts and database sizes.
  • Ask any provider to confirm response expectations and service levels in the written agreement before signing.

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.