How to build Better Stack dashboards in Metabase
Better Stack is an uptime monitoring, incident management, and log/telemetry platform with on-call scheduling and public status pages. Metabase is where you turn those operational signals into shared, trustworthy dashboards. This guide covers two complementary paths: a lightweight MCP + CLI route that pulls live data with the Better Stack MCP server and loads a CSV into Metabase with the Metabase CLI, and a durable pipeline route that syncs Better Stack rollups into a database so you can build dashboards anyone can read.
How do you connect Better Stack to Metabase?
Most teams combine both routes: use MCP and CLI uploads for a fast first pass, then move recurring reliability reporting to a warehouse-backed model.
Live data in, quick analysis out
Pair the Better Stack MCP server 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.
- Quick lookups such as "show me uptime by monitor and service"
- Loading a Better Stack export into Metabase in seconds
- Spot-checks and one-off analyses without a warehouse
- Great for exploration, not governed reliability reporting
- Use read-only/scoped credentials wherever the MCP server supports them
- CSV uploads are snapshots — refresh or move to the pipeline for history
Durable dashboards with history
Sync Better Stack rollups and metadata into a database or warehouse with a connector, custom pipeline, or API, then point Metabase at it.
- Better Stack reliability dashboards leaders depend on
- Joining Better Stack data with deploys, issues, support, or cost data
- Long-run trends for uptime by monitor and service and downtime incidents and recovery
- You own the refresh schedule and the rollup grain
- Sync aggregates and entities — not the raw event firehose
- Metric definitions must be consistent across services and teams
What can you analyze from Better Stack data in Metabase?
- Uptime by monitor and service — built from monitor check rollups and the related downtime incidents, monitors, heartbeats data your sync exposes.
- Downtime incidents and recovery — built from monitor check rollups and the related downtime incidents, monitors, heartbeats data your sync exposes.
- Response time trends — built from monitor check rollups and the related downtime incidents, monitors, heartbeats data your sync exposes.
- On-call and escalation load — built from monitor check rollups and the related downtime incidents, monitors, heartbeats data your sync exposes.
- SLA compliance — built from monitor check rollups and the related downtime incidents, monitors, heartbeats data your sync exposes.
Which Better Stack dashboards should you build in Metabase?
Uptime overview
Whether every monitored endpoint meets its target.
- Uptime percentage by monitor (table)
- Uptime trend by week (line)
- Monitors below target (number)
- Checks by region or location (bar)
Downtime incidents
How often things go down and how fast they recover.
- Downtime incidents per week (bar)
- Median time to recovery (line)
- Longest outages this quarter (table)
- Repeat offenders by monitor (table)
Response time
Latency trends before they become outages.
- Response time p95 by monitor (line)
- Slowest endpoints (table)
- Response time by region (bar)
- Degradation vs. 28-day baseline (table)
SLA compliance
Uptime against the targets you publish.
- SLA compliance by service (bar)
- Downtime minutes vs. allowance (table)
- Months breaching SLA (table)
- Status-page incident count (line)
How do you use the Better Stack MCP server with the Metabase CLI?
Pair the Better Stack MCP server 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 recent monitor check rollups with downtime incidents and response-time summaries.
- Export the result as CSV, keeping stable IDs, services, environments, severities, and timestamps.
- Run
mb upload csvto 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 replaceor move to the pipeline for real history. - Per-window check rollups and incident start/resolve timestamps are required for uptime and MTTR trends.
mb upload csvneeds an uploads database configured under Admin → Settings → Uploads.
How do you set up Better Stack MCP and the Metabase CLI?
Better Stack MCP serverofficial
- Transport
- Hosted remote MCP via Streamable HTTP
- Auth
- OAuth or an API token (Bearer header)
- 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)
{
"mcpServers": {
"betterstack": {
"url": "https://mcp.betterstack.com"
}
}
}Clients without remote-HTTP support can bridge with npx -y mcp-remote https://mcp.betterstack.com. Limit exposed tools with the X-MCP-Tools-Only header for analysis-only sessions.
# 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 monitor-check-rollups export — creates a table AND a model
mb upload csv --file better-stack-monitor-check-rollups.csv --collection root
# Refresh that same table later from a new export
mb upload replace <table-id> --file better-stack-monitor-check-rollups.csvCan you generate a Better Stack dashboard with AI?
Yes. Use the prompt below with any assistant that can run the Better Stack MCP server and the Metabase CLI. It works end to end: if Better Stack 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.
Create a polished Metabase dashboard for Better Stack uptime monitoring analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.
Goal: Help engineering and operations leaders understand uptime by monitor, downtime incidents, recovery speed, response times, and SLA compliance from Better Stack data.
Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for better-stack tables and
models). If durable Better Stack 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 Better Stack MCP server:
monitor check rollups, plus downtime incidents, monitors, heartbeats.
Prefer aggregated or rollup views over raw events. 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, services,
environments, timestamps, and whether rollups or history exist before creating
duration or trend cards.
Important:
- Build on whatever data is present; don't claim Metabase connects natively to
Better Stack — it reads a database or CLI-uploaded tables.
- Never try to load the raw event firehose into Metabase; use rollups, entity
tables, and incident- or group-grain data.
- Only compute durations (MTTA, MTTR, time-to-resolve) when the required
timestamps exist.
- Exclude test, staging, or muted objects from headline reliability cards, and
segment by environment where the field exists.
- 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: Better Stack Uptime Monitoring Overview
Sections:
1. Executive summary: Overall uptime last 30 days; Monitors below target;
Downtime incidents last 30 days; Median time to recovery.
2. Uptime: Uptime percentage by monitor by week; monitors below target.
3. Incidents: Downtime incidents by week; recovery-time trend; longest outages.
4. Response time: p95 by monitor; slowest endpoints; degradation vs. baseline.
5. SLA: Compliance by service; downtime minutes vs. allowance; breach history.
Filters: Date range, Service, Environment, Severity, 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 Better Stack data into a database or warehouse?
For dashboards that need history and reliability, land Better Stack rollups and metadata 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 Better Stack Uptime API v3 for control over rollup grain, fields, and refresh cadence.
- MCP + CSV — use this for quick exploration and one-off slices.
No managed connector exists — script the Uptime API v3 (monitors, incidents, and incident timelines return JSON) on a schedule, and land uptime rollups plus a downtime-incident table in your warehouse.
Notes
- Decide the rollup grain first (hourly or daily per service/environment) — it drives warehouse cost and every trend card.
- Land raw entity tables first, then build clean Metabase models on top.
- Normalize monitor, service, environment, window-start, up-seconds, and incident-timestamp fields.
How should you model Better Stack data in Metabase?
Core tables
| Table | Grain | Key columns |
|---|---|---|
uptime_check_rollups | one row per monitor per hour or day | monitor_name, service_name, window_start, up_seconds, total_seconds, avg_response_ms, p95_response_ms |
downtime_incidents | one row per downtime incident | id, monitor_name, cause, started_at, acknowledged_at, resolved_at |
betterstack_monitors | one row per monitor | id, name, url, check_frequency_seconds, regions, status |
Modeling advice
- Build a clean
uptime_check_rollupsmodel with common columns across tools, so multi-source dashboards don't fork definitions. - Separate entity tables (services, monitors, policies) from time-series rollups and event-grain tables.
- Exclude test, staging, and muted objects from headline reliability metrics; keep environment as an explicit column.
- Use stable IDs for service, team, and incident joins; display names change.
Which Better Stack metrics should you track in Metabase?
| Metric | Definition | Notes |
|---|---|---|
| Service availability | Up seconds or successful checks divided by total, per monitor. | Time-based uptime and request-based availability differ — pick one. |
| Incident count | Qualifying downtime incidents per period, by service. | Separate confirmed downtime from flapping checks. |
| MTTR | Median time from downtime start to recovery. | Use median and p90, not the mean. |
| SLO compliance | Actual uptime against the SLA or SLO target per service. | Track downtime minutes against the explicit allowance. |
What SQL powers Better Stack dashboards in Metabase?
These assume a cleaned analytical model in a warehouse (PostgreSQL dialect). Adjust table and column names to match your pipeline.
From up/total-second rollups per check window.
SELECT
monitor_name,
date_trunc('week', window_start) AS week,
ROUND(
100.0 * SUM(up_seconds) / NULLIF(SUM(total_seconds), 0), 3
) AS uptime_pct
FROM uptime_check_rollups
WHERE environment = 'production'
GROUP BY 1, 2
ORDER BY 1, 2;Frequency and median recovery per monitor, trailing 90 days.
SELECT
monitor_name,
COUNT(*) AS downtime_incidents,
percentile_cont(0.5) WITHIN GROUP (
ORDER BY EXTRACT(EPOCH FROM (resolved_at - started_at)) / 60
) AS median_recovery_minutes,
MAX(EXTRACT(EPOCH FROM (resolved_at - started_at)) / 60)
AS longest_outage_minutes
FROM downtime_incidents
WHERE started_at >= CURRENT_DATE - INTERVAL '90 days'
AND resolved_at IS NOT NULL
GROUP BY monitor_name
ORDER BY downtime_incidents DESC;Average and p95 latency from check rollups — no re-aggregated percentiles.
-- Keep average and p95 at the rollup grain they were computed.
-- Re-averaging avgs or taking MAX of daily p95s invents a fake percentile.
SELECT
monitor_name,
window_start,
avg_response_ms,
p95_response_ms
FROM uptime_check_rollups
WHERE window_start >= CURRENT_DATE - INTERVAL '28 days'
ORDER BY 1, 2;