Jenkins × Metabase

How to build Jenkins dashboards in Metabase

Jenkins is the open-source automation server that runs the build, test, and deployment pipelines behind a huge share of the world's software. Metabase is where you turn that delivery activity into shared, trustworthy dashboards. This guide covers two complementary paths: a lightweight MCP + CLI route that pulls live data with the Jenkins MCP Server plugin and loads a CSV into Metabase with the Metabase CLI, and a durable pipeline route that syncs Jenkins history into a database so you can build dashboards anyone can read.

Heads up: Metabase connects to databases and warehouses — it does not ship a native Jenkins connector, and a BI warehouse is the wrong home for raw logs and event streams. Sync entities and history — runs, pull requests, stories, flag changes — and leave the raw firehose in Jenkins.

How do you connect Jenkins to Metabase?

Most teams combine both routes: use MCP and CLI uploads for a fast first pass, then move recurring delivery reporting to a warehouse-backed model.

1 · MCP + CLI route (AI-assisted)

Live data in, quick analysis out

Pair the Jenkins MCP Server plugin with the Metabase CLI. Use MCP for live lookups, write a scoped result to CSV, then load it into Metabase as a ready-to-query table and model.

Best for
  • Quick lookups such as "show me build success rate by job"
  • Loading a Jenkins export into Metabase in seconds
  • Spot-checks and one-off analyses without a warehouse
Trade-offs
  • Great for exploration, not governed delivery reporting
  • Use read-only or scoped credentials wherever the MCP server supports them
  • CSV uploads are snapshots — refresh or move to the pipeline for history
2 · Pipeline route (warehouse-backed)

Durable dashboards with history

Sync Jenkins entities and history into a database or warehouse with a connector, custom pipeline, or the API, then point Metabase at it.

Best for
  • Jenkins delivery dashboards leaders depend on
  • Joining Jenkins data with issues, deploys, incidents, or support data
  • Long-run trends for build success rate by job and pipeline duration trend
Trade-offs
  • You own the refresh schedule and the table grain
  • Sync entities and rollups — not raw logs or event firehoses
  • Metric definitions must be consistent across teams and repos

What can you analyze from Jenkins data in Metabase?

Once builds (pipeline runs) and the related jobs, stages, test results data are in a database, the highest-value views are:

  • Build success rate by job — which jobs fail most, and whether main-branch stability is improving week over week.
  • Pipeline duration trend — median and p95 build times, so a slowly degrading feedback loop shows up before people complain.
  • Flaky test hotspots — tests that pass and fail on the same code, ranked by how much rerun time they burn.
  • Queue time and agent utilization — how long builds wait for an executor, and whether the agent fleet matches demand.
  • Deployment pipeline health — success rate and duration for the jobs that actually ship to production.

Which Jenkins dashboards should you build in Metabase?

For: Platform and DevX engineers

Build health

Whether the pipeline is a reliable path to production.

  • Build success rate by week (line)
  • Failed builds by job or pipeline (bar)
  • Builds per day (line)
  • Currently failing jobs (table)
For: Eng leads

Pipeline performance

Whether the path to production is getting slower.

  • Median build duration by week (line)
  • p95 duration by pipeline (bar)
  • Queue time vs. run time (stacked bar)
  • Slowest pipelines (table)
For: Test owners

Test quality

Which tests waste the most engineering time.

  • Flaky tests ranked by failure rate (table)
  • Test failures per week (line)
  • Retry volume by suite (bar)
  • New flaky tests this week (table)
For: Leadership

Delivery throughput

The shipping picture behind the DORA metrics.

  • Production deploys per week (bar)
  • Change failure rate (number + trend)
  • Lead time from commit to deploy (line)
  • Deploys by project (table)

How do you use the Jenkins MCP Server plugin with the Metabase CLI?

Pair the Jenkins MCP Server plugin with the Metabase CLI for fast, hands-on analysis. MCP is useful for scoped lookups and summarized exports; the Metabase CLI's upload command loads CSV data into Metabase and creates a ready-to-query table and model.

Example workflow

  • Ask the MCP server for the last 90 days of builds (pipeline runs) with status, duration, and queue time.
  • Export the result as CSV, keeping stable IDs, projects, states, and timestamps.
  • Run mb upload csv to load it into Metabase as a table and model, then build questions and dashboards on top.

Be honest about the limits

  • MCP lookups are excellent for exploration, not scheduled reporting.
  • A CSV upload is a snapshot; refresh it with mb upload replace or move to the pipeline for real history.
  • Run-grain history with queued, started, and finished timestamps is required for duration and success-rate trends.
  • mb upload csv needs an uploads database configured under Admin → Settings → Uploads.

How do you set up Jenkins MCP and the Metabase CLI?

Jenkins MCP Server pluginofficial

Transport
Self-hosted remote MCP on your controller via Streamable HTTP
Auth
HTTP Basic with a Jenkins user API token
Best for
Live scoped lookup and export

Metabase CLIofficial

Install
npm install -g @metabase/cli
Auth
mb auth login
Load data
mb upload csv --file data.csv
Requires
An uploads database (Admin → Settings → Uploads)
MCPExample MCP client config
{
  "mcpServers": {
    "jenkins": {
      "url": "https://jenkins.example.com/mcp-server/mcp"
    }
  }
}

Requires Jenkins 2.533+ with the official mcp-server plugin installed — the endpoint lives on your own controller. Several community PyPI/npm packages use Jenkins-flavored names; the plugin from the jenkinsci org is the official one.

TerminalLoad a Jenkins CSV with the Metabase CLI
# Install the Metabase CLI
npm install -g @metabase/cli

# Log in (opens your browser; requires Metabase v62+)
mb auth login --url https://your-metabase.example.com

# Load a builds-pipeline-runs export — creates a table AND a model
mb upload csv --file jenkins-builds-pipeline-runs.csv --collection root

# Refresh that same table later from a new export
mb upload replace <table-id> --file jenkins-builds-pipeline-runs.csv

Can you generate a Jenkins dashboard with AI?

Yes. Use the prompt below with any assistant that can run the Jenkins MCP Server plugin and the Metabase CLI. It works end to end: if Jenkins tables already exist in Metabase it analyzes those; otherwise it pulls scoped, summarized data over MCP, loads it with mb upload csv, then builds the dashboard and caveats any metric that needs missing history.

Prompt for creating a Jenkins CI/CD Overview dashboard
Create a polished Metabase dashboard for Jenkins ci/cd analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.

Goal: Help engineering leaders understand build health, pipeline performance, test quality, and delivery throughput from Jenkins data.

Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for jenkins tables and
  models). If durable Jenkins data is already present — synced from a warehouse
  or uploaded earlier — use it and skip to Step 2.
- If nothing is there, pull a scoped, summarized export with the Jenkins MCP Server plugin:
  builds (pipeline runs), plus jobs, stages, test results.
  Prefer entity tables and rollups over raw logs. Write each result to a CSV,
  then load it with the Metabase CLI — run "mb upload csv --file <export>.csv" so
  each upload creates a table and a ready-to-query model. Use "mb upload replace
  <table-id> --file <export>.csv" to refresh an existing table instead of creating
  duplicates.

Step 2 — Inspect before querying:
Do not assume exact table or column names. Inspect available fields, projects,
branches, states, and timestamps, and whether history exists before creating
duration or trend cards.

Important:
- Build on whatever data is present; don't claim Metabase connects natively to
  Jenkins — it reads a database or CLI-uploaded tables.
- Never try to load raw build logs or event streams into Metabase; use runs,
  entities, state changes, and rollups.
- Only compute durations (cycle time, build duration, time to review) when the
  required timestamps exist.
- Exclude bot activity, draft work, and non-production environments from
  headline numbers, and keep the segmenting column explicit.
- A single CSV is a point-in-time snapshot: only build trend cards if there is a
  usable date column or multiple periods have been uploaded.

Dashboard title: Jenkins CI/CD Overview

Sections:
1. Executive summary: Builds last 30 days; Success rate; Median duration;
   Flaky tests flagged; Production deploys.
2. Build health: Success rate by week; failed builds by job; builds per day.
3. Performance: Median and p95 duration by week and pipeline; queue time.
4. Test quality: Flaky tests by failure rate; test failures per week; retries.
5. Throughput: Deploys per week; change failure rate; lead time where synced.

Filters: Date range, Project or Repository, Branch or Environment, Team, Status.

Output: Build the dashboard if you have permission; otherwise provide the exact
questions, SQL, model definitions, and layout. Include caveats for any metric
that cannot be calculated from the available data.

How do you sync Jenkins data into a database or warehouse?

For dashboards that need history and reliability, land Jenkins entities and change history in a database first, then connect Metabase to that database.

Connector options

  • Managed ETL — use a connector when one covers the objects you need.
  • Custom pipeline — use the Jenkins remote access API for control over fields, grain, and refresh cadence.
  • MCP + CSV — use this for quick exploration and one-off slices.

There is no reliable managed connector for Jenkins — Airbyte's source is archived. Most teams script exports against the remote access API (builds, jobs, test reports as JSON), or push build events into a database from the pipeline itself with a post-build step.

Notes

  • Land raw entity tables first, then build clean Metabase models on top.
  • Sync state-change or audit history from day one — duration metrics can't be reconstructed later without it.
  • Normalize project or job, branch, status, queued/started/finished-timestamp, and duration fields.

How should you model Jenkins data in Metabase?

Core tables

TableGrainKey columns
jenkins_buildsone row per build (run) per jobid, job_name, result, queued_at, started_at, duration_seconds, agent, triggered_by
jenkins_stagesone row per stage per buildbuild_id, stage_name, status, duration_seconds, started_at
jenkins_test_resultsone row per test case per buildbuild_id, suite, test_name, status, duration_seconds, failed_since_build

Modeling advice

  • Build a clean pipeline_runs model with common columns across tools, so multi-source dashboards don't fork definitions.
  • Separate entity tables (projects, repos, flags, members) from run-grain and event-grain tables.
  • Exclude bots, drafts, and non-production environments from headline metrics; keep the flag as an explicit column.
  • Use stable IDs for project, repo, and person joins; display names change.

Which Jenkins metrics should you track in Metabase?

MetricDefinitionNotes
Build success rateSuccessful runs divided by all completed runs, per pipeline.Segment by branch; main-branch health is the headline.
Pipeline durationMedian and p95 wall-clock time from start to finish.Track queue time separately from run time.
Flaky test rateTests that both pass and fail on the same code.Rank by failure rate and time wasted, not raw count.
Deployment frequencyProduction deployments per period — a DORA throughput metric.Count deploys, not builds or merges.

What SQL powers Jenkins dashboards in Metabase?

These assume a cleaned analytical model in a warehouse (PostgreSQL dialect). Adjust table and column names to match your pipeline.

Build success rate by weekPostgreSQL

Main-branch pipeline health over time.

SELECT
  date_trunc('week', started_at) AS week,
  COUNT(*) AS builds,
  ROUND(
    100.0 * COUNT(*) FILTER (WHERE result = 'success')
    / NULLIF(COUNT(*), 0), 1
  ) AS success_rate_pct
FROM pipeline_runs
WHERE branch = 'main'
GROUP BY 1
ORDER BY 1;
Pipeline duration, median and p95PostgreSQL

Whether the path to production is getting slower.

SELECT
  pipeline_name,
  percentile_cont(0.5) WITHIN GROUP (
    ORDER BY duration_seconds
  ) / 60.0 AS median_minutes,
  percentile_cont(0.95) WITHIN GROUP (
    ORDER BY duration_seconds
  ) / 60.0 AS p95_minutes
FROM pipeline_runs
WHERE started_at >= CURRENT_DATE - INTERVAL '30 days'
  AND result = 'success'
GROUP BY pipeline_name
ORDER BY median_minutes DESC;
Flaky tests ranked by failure ratePostgreSQL

Tests that both pass and fail on the same code, trailing 14 days.

SELECT
  test_name,
  COUNT(*) AS runs,
  COUNT(*) FILTER (WHERE result = 'failed') AS failures,
  ROUND(
    100.0 * COUNT(*) FILTER (WHERE result = 'failed')
    / NULLIF(COUNT(*), 0), 1
  ) AS failure_rate_pct
FROM test_results
WHERE run_at >= CURRENT_DATE - INTERVAL '14 days'
GROUP BY test_name
HAVING COUNT(*) FILTER (WHERE result = 'failed') > 0
  AND COUNT(*) FILTER (WHERE result = 'passed') > 0
ORDER BY failure_rate_pct DESC
LIMIT 20;

What are common mistakes when analyzing Jenkins in Metabase?

Syncing raw logs or event streams into the warehouse.→ Land runs, entities, state changes, and rollups. Raw build logs and evaluation events belong in Jenkins; the warehouse is for trends and joins.
Reporting build duration as an average.→ Build times are right-skewed by cold caches and dependency changes. Use the median and p95, and trend them separately.
Mixing branches in headline success rates.→ Feature-branch failures are normal; main-branch failures are not. Keep branch as an explicit column and report main separately.
Building dashboards from live MCP lookups only.→ MCP is useful for exploration; durable dashboards need a database-backed model with history.

Related analytics

Related dashboards

Related integrations

FAQ

Does Metabase connect natively to Jenkins?
No. Metabase reads databases and warehouses. Sync Jenkins entities and history into a database first, or upload a CSV with the Metabase CLI, then build Metabase models and dashboards on top.
Should Metabase replace Jenkins's built-in reporting?
No — they answer different questions. Jenkins's own views are built for operating the tool day to day. Metabase is where you build governed, shareable reporting on top of the same data, and join it with the rest of your delivery stack — issues, deploys, incidents, and business outcomes.
Should I sync raw Jenkins build logs into my warehouse?
No. Sync run-grain records — one row per build with status, timestamps, and durations — plus per-test results if you track flakiness. Console logs are enormous, unqueryable at the SQL layer, and better served by the CI tool itself.
How do I measure flaky tests credibly?
A test is flaky when it both passes and fails against the same code. Compute it from per-test results filtered to retried runs or identical commits — see flaky test rate for the SQL patterns and the caveats about retry-based shortcuts.