bambulab-metrics-exporter

bambulab-metrics-exporter

Docker 应用程序 from BlackBush's Repository

概述

Prometheus exporter for Bambu Lab printers on Unraid. Exposes /metrics, /health, and /ready. Quick setup: 1) Set required values: BAMBULAB_TRANSPORT, BAMBULAB_SERIAL, BAMBULAB_SECRET_KEY (example: openssl rand -base64 48). 2) cloud_mqtt: set BAMBULAB_CLOUD_EMAIL (code/token fields can be left empty for first run and may auto-populate). 3) local_mqtt: set BAMBULAB_HOST and BAMBULAB_ACCESS_CODE. Then start the container and open WebUI for status. Scrape /metrics from Prometheus.

运行时参数

网络用户界面
http://[IP]:[PORT:9109]/
网络
bridge
外壳
sh
特权
false

模板配置

Web UI PortPorttcp

Exporter HTTP port

目标
9109
默认值
9109
价值
9109
Config DirPathrw

Persistent config and encrypted credentials

目标
/config/bambulab-metrics-exporter
默认值
/mnt/user/appdata/bambulab-metrics-exporter
价值
/mnt/user/appdata/bambulab-metrics-exporter
Listen HostVariable

HTTP bind host

目标
LISTEN_HOST
默认值
0.0.0.0
价值
0.0.0.0
Listen PortVariable

HTTP bind port

目标
LISTEN_PORT
默认值
9109
价值
9109
TransportVariable

Select transport mode

目标
BAMBULAB_TRANSPORT
默认值
cloud_mqtt|local_mqtt
价值
cloud_mqtt
Printer SerialVariable

Printer device serial (required)

目标
BAMBULAB_SERIAL
Secret KeyVariable

Strong key for encrypted credentials. Generate example: openssl rand -base64 48

目标
BAMBULAB_SECRET_KEY
Cloud EmailVariable

Used only when Transport=cloud_mqtt. Recommended/required for automatic cloud auth flow.

目标
BAMBULAB_CLOUD_EMAIL
Cloud One-Time CodeVariable

Used only when Transport=cloud_mqtt. Optional verification code from email; if empty, startup can trigger code flow and ask for restart.

目标
BAMBULAB_CLOUD_CODE
Cloud User IDVariable

Used only when Transport=cloud_mqtt. Usually auto-filled by startup auth process; can stay empty on first run.

目标
BAMBULAB_CLOUD_USER_ID
Cloud Access TokenVariable

Used only when Transport=cloud_mqtt. Usually auto-filled by startup auth process; leave empty unless setting manually.

目标
BAMBULAB_CLOUD_ACCESS_TOKEN
Cloud Refresh TokenVariable

Used only when Transport=cloud_mqtt. Auto-filled when available by startup auth process; optional for manual setup.

目标
BAMBULAB_CLOUD_REFRESH_TOKEN
Cloud MQTT HostVariable

Cloud MQTT host

目标
BAMBULAB_CLOUD_MQTT_HOST
默认值
us.mqtt.bambulab.com
价值
us.mqtt.bambulab.com
Cloud MQTT PortVariable

Cloud MQTT port

目标
BAMBULAB_CLOUD_MQTT_PORT
默认值
8883
价值
8883
Local Host/IPVariable

Used only when Transport=local_mqtt. Required printer IP/hostname.

目标
BAMBULAB_HOST
Local Access CodeVariable

Used only when Transport=local_mqtt. Required LAN access code from printer settings.

目标
BAMBULAB_ACCESS_CODE
Local MQTT PortVariable

Used only when Transport=local_mqtt. Usually keep default 8883.

目标
BAMBULAB_PORT
默认值
8883
价值
8883
Local MQTT UsernameVariable

Used only when Transport=local_mqtt. Usually keep default bblp.

目标
BAMBULAB_USERNAME
默认值
bblp
价值
bblp
PUIDVariable

User ID to run container as (Unraid: usually 99)

默认值
99
价值
99
PGIDVariable

Group ID to run container as (Unraid: usually 100)

默认值
100
价值
100
UMASKVariable

File creation mask

默认值
002
价值
002
Config Dir EnvVariable

Internal config path

目标
BAMBULAB_CONFIG_DIR
默认值
/config/bambulab-metrics-exporter
价值
/config/bambulab-metrics-exporter
Credentials FileVariable

Encrypted credentials filename

目标
BAMBULAB_CREDENTIALS_FILE
默认值
credentials.enc.json
价值
credentials.enc.json
Polling IntervalVariable

Polling interval in seconds

目标
POLLING_INTERVAL_SECONDS
默认值
10
价值
10
Request TimeoutVariable

Request timeout in seconds

目标
REQUEST_TIMEOUT_SECONDS
默认值
8
价值
8
Log LevelVariable

DEBUG/INFO/WARNING/ERROR

目标
LOG_LEVEL
默认值
INFO
价值
INFO
Printer Name LabelVariable

Prometheus label value; leave empty to auto-fill from printer serial

目标
PRINTER_NAME

详细信息

存储库
ghcr.io/theblackbush/bambulab_metrics_exporter:latest
最后更新2026-05-31
初见2026-03-30

在Unraid 上运行 bambulab-metrics-exporter 。

bambulab-metrics-exporter 已被列入Unraid OS 的社区应用程序。探索Unraid ,构建灵活的家庭服务器、NAS 或家庭实验室。