Bambulab Metrics

Real-time monitoring dashboard for BambuLab 3D printers. Tracks printer health, print progress, temperatures, fan speeds, AMS filament inventory, and queue status via Prometheus metrics. Supports multiple printers and AMS units automatically.

Bambulab Metrics screenshot 1
Bambulab Metrics screenshot 2
Bambulab Metrics screenshot 3
Bambulab Metrics screenshot 4
Bambulab Metrics screenshot 5
Bambulab Metrics screenshot 6
Bambulab Metrics screenshot 7

BambuLab 3D Printer — Grafana Dashboard

Real-time monitoring dashboard for BambuLab 3D printers. Tracks printer health, live print progress, temperatures, fan speeds, AMS filament inventory, and job queue status. Supports multiple printers and multiple AMS units automatically via Prometheus label-based discovery.


Requirements

ComponentVersion
Grafana10.0+
Prometheus2.40+
bambulab_metrics_exporterLatest
Grafana Business Text plugin5.0+

Grafana plugins required

This dashboard uses the Business Text panel (formerly Dynamic Text) by Volkov Labs for the AMS filament inventory visualization. The AMS panel renders filament spool cards with real colors, type labels, remaining % progress bars, and active slot indicators using a Handlebars HTML template. It cannot be replicated with native Grafana panel types because Canvas does not support dynamic color binding from label values, and Stat/Table panels cannot loop over rows to render per-slot cards.

1. Install the Business Text plugin

Via Grafana CLI:

grafana-cli plugins install marcusolsson-dynamictext-panel

Via Docker — add to your docker-compose.yml:

environment:
  - GF_INSTALL_PLUGINS=marcusolsson-dynamictext-panel

Via Grafana UI: Administration → Plugins → Search "Business Text" → Install.

Restart Grafana after installing.

2. Enable HTML rendering

The Business Text panel renders HTML templates. By default Grafana sanitizes HTML for security, which strips all styling and layout. You must disable sanitization for the AMS panel to render correctly.

Option A — grafana.ini:

[panels]
disable_sanitize_html = true

Option B — environment variable (recommended for Docker):

GF_PANELS_DISABLE_SANITIZE_HTML=true

Docker Compose example:

services:
  grafana:
    image: grafana/grafana:latest
    environment:
      - GF_PANELS_DISABLE_SANITIZE_HTML=true
      - GF_INSTALL_PLUGINS=marcusolsson-dynamictext-panel

Restart Grafana after making this change. Without it the AMS panel will display plain unstyled text instead of the visual spool cards.

3. Set Content mode to HTML

After creating the Business Text panel, in the panel editor make sure to set Content mode → HTML in the panel options on the right side. The default mode is Markdown which will not render the template correctly.


Data collection

Metrics are collected from BambuLab printers via MQTT using the bambulab_metrics_exporter Prometheus exporter. The exporter connects to the printer's local MQTT broker and exposes all telemetry as Prometheus gauges on a /metrics endpoint.

How it works

BambuLab Printer (MQTT)
        │
        ▼
bambulab_metrics_exporter (Prometheus exporter)
        │
        ▼
Prometheus (scrapes /metrics every 15s)
        │
        ▼
Grafana (queries Prometheus)

For exporter installation and configuration see the bambulab_metrics_exporter README.

Prometheus scrape config

Add this to your prometheus.yml:

scrape_configs:
  - job_name: bambulab
    scrape_interval: 15s
    scrape_timeout: 10s
    static_configs:
      - targets:
          - localhost:9101        # Replace with your exporter host/port
        labels:
          environment: home

Reload Prometheus after adding:

curl -X POST http://localhost:9090/-/reload

Verify metrics are flowing by visiting:

http://localhost:9101/metrics

You should see metrics prefixed with bambulab_.


Dashboard panels

Printer status row

PanelTypeDescription
Printer healthStatShows polling status, MQTT connection, error flag, and SD card presence as green/red indicators
Gcode stateStatCurrent gcode state — IDLE, RUNNING, FINISH, PAUSED, FAILED etc.
Print stageStatCurrent print stage, MC stage code, and active sub-stage activity (bed heating, calibrating, etc.)
Current jobStatFilename of the currently printing or last printed job
PanelTypeDescription
Progress %GaugeOverall print completion percentage
Layer counterStatCurrent layer vs total layers (e.g. 423 / 899)
Time remainingStatEstimated time remaining formatted as HH:MM
Progress over timeTime seriesProgress % and layer progress % plotted over time, with remaining minutes on a second Y axis

Temperatures row

PanelTypeDescription
Nozzle temperatureGaugeCurrent nozzle temp with target overlay
Bed temperatureGaugeCurrent bed temp with target overlay
Chamber temperatureGaugeChamber ambient temperature
All temperaturesTime seriesNozzle, bed, and chamber temperatures on one graph with dashed target lines

Fans row

PanelTypeDescription
Fan speedsBar gaugeAll 5 fans (big fan 1 & 2, cooling, heatbreak, auxiliary) shown as horizontal bar gauges 0–100%

AMS row

PanelTypeDescription
AMS filament inventoryBusiness TextVisual spool cards per slot showing filament color, type, remaining %, and active indicator. Supports multiple AMS units side by side, responsive layout, with external spool shown separately at the bottom
AMS humidity & temperatureStat + Time seriesPer-AMS-unit humidity %, humidity index, and internal temperature
AMS statusStatAMS system status, RFID status, and auto-switch flag

Speed & network row

PanelTypeDescription
Speed modeStatCurrent speed profile — Silent, Standard, Sport, or Ludicrous
Speed %StatSpeed magnitude as percentage relative to standard
WiFi signalGaugeWiFi signal strength in dBm
QueueStatNumber of queued jobs, current queue position, and estimated queue time

Errors & safety row

PanelTypeDescription
Error stateStatPrinter error flag, print error code, AP error code, filament tangle detection
XCam featuresStatStatus of all XCam AI features — spaghetti detector, first layer inspector, print halt, printing monitor, buildplate marker detector
Door & lightsStatDoor open/closed, chamber light, work light

Exporter health row

PanelTypeDescription
Scrape healthStatExporter scrape success flag, scrape duration, and timestamp of last successful poll

Key metrics reference

MetricDescription
bambulab_printer_up1 if last poll had a valid payload
bambulab_printer_connected1 if MQTT connection is active
bambulab_print_progress_percentOverall print progress 0–100
bambulab_print_remaining_secondsEstimated seconds remaining
bambulab_print_layer_currentCurrent layer number
bambulab_print_layer_totalTotal layer count
bambulab_nozzle_temperature_celsiusNozzle current temperature
bambulab_nozzle_target_temperature_celsiusNozzle target temperature
bambulab_bed_temperature_celsiusBed current temperature
bambulab_chamber_temperature_celsiusChamber temperature
bambulab_ams_slot_tray_infoFilament color and type per AMS slot
bambulab_ams_slot_remaining_percentRemaining filament % per slot (-1 = no sensor)
bambulab_ams_unit_humidityAMS internal humidity %
bambulab_ams_unit_temperature_celsiusAMS internal temperature
bambulab_printer_gcode_stateOne-hot gcode state label
bambulab_wifi_signalWiFi signal in dBm
bambulab_printer_error1 when printer reports an error
bambulab_xcam_feature_enabledPer-feature XCam enabled flags
bambulab_external_spool_infoExternal spool color, type, and filament code

Full metric list available at your exporter's /metrics endpoint.


Multiple printers

The dashboard uses printer_name as a label on all metrics. To support multiple printers, add a Dashboard variable:

  1. Dashboard Settings → Variables → Add variable
  2. Type: Query
  3. Name: printer
  4. Query:
label_values(bambulab_printer_up, printer_name)
  1. Then update all panel queries to use {printer_name="$printer"} instead of a hardcoded name.

Alerting suggestions

AlertCondition
Printer offlinebambulab_printer_up == 0 for > 2 minutes
MQTT disconnectedbambulab_printer_connected == 0 for > 1 minute
Printer errorbambulab_printer_error == 1
Filament tanglebambulab_filament_tangle_detected == 1
High chamber tempbambulab_chamber_temperature_celsius > 60
AMS high humiditybambulab_ams_unit_humidity_index >= 4
Print stalledbambulab_print_progress_percent unchanged for > 30 minutes while gcode_state == RUNNING

License

MIT — free to use, modify, and share.

Revisions
RevisionDescriptionCreated

Get this dashboard

Import the dashboard template

or

Download JSON

Datasource
Dependencies