Skip to main content

Export stellar account balance in prometheus format

Project description


The Stellar Account Prometheus Exporter retrieves account(s) balance and exposes it in prometheus format.


Configuration file path must be provided using the --config option.

The config file is yaml formatted file:

- name: pubnet                              # Human readable name
  horizon_url:  # Horizon URL
  - account_id: ABC123XYZ     # Account ID
    account_name: Account one # Human readable description
  - account_id: DEF456ABC
    account_name: Account two
- name: testnet
  - account_id: QWE789DEF
    account_name: Testnet test account

By default the exporter listens on port 9618. This can be changes using --port switch or "PORT" environment variable.

Exported data

For each account the following metrics are exported:

  • stellar_account_balance
  • stellar_account_available_balance
  • stellar_account_buying_liabilities
  • stellar_account_selling_liabilities
  • stellar_account_num_sponsored
  • stellar_account_num_sponsoring

Each metric has the following labels:

  • network - network name from the configuration file
  • account_id - account ID from the configuration file
  • account_name - account name, as per configuration file
  • asset_type - asset type

Installing from pypi

To download/test package in pypi you can use venv:

python3 -m venv venv
. venv/bin/activate


python3 -m pip install stellar_account_prometheus_exporter


./venv/bin/stellar-account-prometheus-exporter --config /path/to/config.yaml

Releasing new version

  • ensure you bumped version number in PyPi does not allow version reuse
  • build new package:
python3 sdist bdist_wheel
  • push to testpypi:
python3 -m twine upload --repository-url dist/*
  • test by installing the package (see above). If all good release:
python3 -m twine upload dist/*

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for stellar-account-prometheus-exporter, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size stellar_account_prometheus_exporter-0.0.4-py3-none-any.whl (9.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size stellar-account-prometheus-exporter-0.0.4.tar.gz (8.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page