Prometheus exporter for the current generation of PrusaLink-enabled Prusa 3D Printers, written in Python.
ORIGINAL PRUSA is a trademark of Prusa Development a.s., CZ
So far, this project has been tested on the following printers:
Printer | Firmware | Prusalink Version | Supported |
---|---|---|---|
Prusa XL | 6.1.3 | 2.1.2 | ✅ |
Prusa XL | 6.0.3 | 2.1.2 | ✅ |
Prusa XL | 5.1.2 | 2.1.2 | ✅ |
If you've had success running it on another platform, please let me know and I'll add it to the list! Thanks!
In addition to standard Python, you'll need:
- prometheus-client
- requests
- yaml
Either install these manually, or use pip install -r requirements.txt
Make a configuration file using the config.example.yaml
example file provided. This file will contain your printer's username and password, so keep it safe!
Launch the exporter by running
$ ./prusalink_exporter.py --config /path/to/config.yaml
You can also daemonize it using the provided systemd unit file, or using another method of your choosing.
Here's an example Prometheus job spec to read metrics from prusalink_exporter.py
that's running alongside prometheus:
- job_name: prusalink
static_configs:
- targets:
- 127.0.0.1:9528
Metric | Description |
---|---|
prusalink_scrape_successful | Indicates if the scrape from the printer was successful |
prusalink_server_firmware_version | Prusa Firmware Running on the Printer |
prusalink_printer_state | Current Printer State |
prusalink_nozzle_diameter | Nozzle Diameter in mm |
prusalink_speed | Current Printer Configured Speed in Percent |
prusalink_flow_rate | Current Printer Configured Flow Rate in Percent |
prusalink_bed_temp_current | Current Printer Bed Temperature in Celcius |
prusalink_bed_temp_desired | Set (Desired) Printer Bed Temperature in Celcius |
prusalink_nozzle_temp_current | Current Extruder Nozzle Temperature in Celcius |
prusalink_nozzle_temp_desired | Set (Desired) Extruder Nozzle Temperature in Celcius |
prusalink_axis_z | Current Z Axis Position in mm |
prusalink_job_progress | Current Job Progress in Percent |
prusalink_job_time_elapsed | Current Job Elapsed Time Printing in Seconds |
prusalink_job_time_remaining | Current Job Time Remaining in Seconds |
prusalink_job_info | Information on the Current Active Job |
You can deploy the included example dashboard.json to your Grafana instance to visualize the metrics reported by prometheus-prusalink-exporter.
You can also set up alerts for prometheus-alertmanager using the included alertmanager/prusalink.yml file as a guide.
This work is an open-sourced software project, licensed under the GPL-3