Skip to main content

Overview

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

Configuration

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

The config file is yaml formatted file:

networks:
- name: pubnet                              # Human readable name
  horizon_url: https://horizon.example.com  # Horizon URL
  accounts:
  - account_id: ABC123XYZ     # Account ID
    account_name: Account one # Human readable description
  - account_id: DEF456ABC
    account_name: Account two
- name: testnet
  horizon_url: https://horizon-testnet.example.com
  accounts:
  - 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
  • stellar_account_scrape_success

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

Install:

python3 -m pip install stellar_account_prometheus_exporter

Run:

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

Releasing new version

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

Docker and K8s version

This app is now dockerized. The new Dockerfile has been validated and can be used like this:

docker build --pull --no-cache -t <your tag>

Download files

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

Source Distribution

stellar-account-prometheus-exporter-0.0.8.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file stellar-account-prometheus-exporter-0.0.8.tar.gz.

File metadata

File hashes

Hashes for stellar-account-prometheus-exporter-0.0.8.tar.gz
Algorithm Hash digest
SHA256 fa1cc95320068b141ad906e582a31be9110582a77fbb31d2075314c2c36f195d
MD5 0bcf5b5fa3ea64b066abe945e569818f
BLAKE2b-256 4dc245e90b397c61c9dbb6af6bf81a18fd89d78dc03aafecafe719beccab028d

See more details on using hashes here.

File details

Details for the file stellar_account_prometheus_exporter-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for stellar_account_prometheus_exporter-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8a2450a095b9ccbb5801b3e8d7c7a336d3a1d37829f9fdad24692a13636bc349
MD5 43e78e8d694a774948c9a241b46663f9
BLAKE2b-256 d9ebdfc45adbd72cf025942397b24d29427905c12d25c0117e1b3c550a893f92

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page