Sign inSign up

t0mmili/backblaze-prometheus-exporter

By t0mmili

•Updated 8 months ago

Prometheus exporter for Backblaze B2 that exposes various metrics for buckets and paths

Image
Monitoring & observability
0

2.7K

t0mmili/backblaze-prometheus-exporter repository overview

⁠Backblaze Prometheus Exporter

A lightweight Prometheus exporter for Backblaze B2 that provides metrics about bucket contents, including:

  • Total number of files in a path
  • Total storage size
  • Timestamp of the most recent upload

The exporter supports monitoring multiple buckets and paths and uses a background collection thread to periodically fetch data from the Backblaze API. This design ensures that Prometheus scrapes are fast and do not trigger expensive API calls.

⁠Features

  • Prometheus-compatible metrics
  • Monitor multiple buckets and paths
  • Background data collection with configurable interval
  • Cached metrics for fast Prometheus scrapes
  • Docker-ready deployment
  • Gunicorn-based production server
  • Non-root container for improved security

⁠Typical Use Cases

  • Monitoring object storage usage
  • Alerting on unexpected data growth
  • Tracking recent uploads to specific paths
  • Observability for backup or archival workflows

⁠Quick Start

docker run -d -p 52000:52000 \
  -v $(pwd)/b2_api_key:/backblaze_exporter/api_key:ro \
  -e B2_APPLICATION_KEY_ID=yourkeyid \
  -e B2_APPLICATION_KEY_FILE=/backblaze_exporter/api_key \
  -e B2_BUCKETS_CONFIG='{"my-bucket": ["path/to/check"]}' \
  t0mmili/backblaze-prometheus-exporter

Metrics will be available at:

http://localhost:52000/metrics

⁠Contribution

Go to GitHub⁠

Tag summary

Content type

Image

Digest

sha256:1f969f9ac…

Size

19.2 MB

Last updated

8 months ago

docker pull t0mmili/backblaze-prometheus-exporter