# 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>
```
Raw data
{
"_id": null,
"home_page": "https://github.com/stellar/stellar-account-prometheus-exporter",
"name": "stellar-account-prometheus-exporter",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "prometheus, exporter, stellar",
"author": "Stellar Development Foundation",
"author_email": "ops@stellar.org",
"download_url": "https://files.pythonhosted.org/packages/4d/c2/45e90b397c61c9dbb6af6bf81a18fd89d78dc03aafecafe719beccab028d/stellar-account-prometheus-exporter-0.0.8.tar.gz",
"platform": null,
"description": "# Overview\n\nThe Stellar Account Prometheus Exporter retrieves account(s)\nbalance and exposes it in prometheus format.\n\n# Configuration\n\nConfiguration file path must be provided using the --config option.\n\nThe config file is yaml formatted file:\n```\nnetworks:\n- name: pubnet # Human readable name\n horizon_url: https://horizon.example.com # Horizon URL\n accounts:\n - account_id: ABC123XYZ # Account ID\n account_name: Account one # Human readable description\n - account_id: DEF456ABC\n account_name: Account two\n- name: testnet\n horizon_url: https://horizon-testnet.example.com\n accounts:\n - account_id: QWE789DEF\n account_name: Testnet test account\n```\n\nBy default the exporter listens on port 9618. This can be changes using\n--port switch or \"PORT\" environment variable.\n\n# Exported data\n\nFor each account the following metrics are exported:\n * *stellar_account_balance*\n * *stellar_account_available_balance*\n * *stellar_account_buying_liabilities*\n * *stellar_account_selling_liabilities*\n * *stellar_account_num_sponsored*\n * *stellar_account_num_sponsoring*\n * *stellar_account_scrape_success*\n\nEach metric has the following labels:\n * *network* - network name from the configuration file\n * *account_id* - account ID from the configuration file\n * *account_name* - account name, as per configuration file\n * *asset_type* - asset type\n\n# Installing from pypi\n\nTo download/test package in pypi you can use venv:\n```\npython3 -m venv venv\n. venv/bin/activate\n```\n\nInstall:\n```\npython3 -m pip install stellar_account_prometheus_exporter\n```\n\nRun:\n```\n./venv/bin/stellar-account-prometheus-exporter --config /path/to/config.yaml\n```\n\n# Releasing new version\n\n* ensure you bumped version number in setup.py. PyPi does not allow version reuse\n* build new package:\n```\npython3 setup.py sdist bdist_wheel\n```\n* push to testpypi:\n```\npython3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*\n```\n* test by installing the package (see above). If all good release:\n```\npython3 -m twine upload dist/*\n```\n\n# Docker and K8s version\nThis app is now dockerized. The new Dockerfile has been validated and can be used like this:\n```\ndocker build --pull --no-cache -t <your tag>\n```\n\n\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "Export stellar account balance in prometheus format",
"version": "0.0.8",
"project_urls": {
"Homepage": "https://github.com/stellar/stellar-account-prometheus-exporter"
},
"split_keywords": [
"prometheus",
" exporter",
" stellar"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d9ebdfc45adbd72cf025942397b24d29427905c12d25c0117e1b3c550a893f92",
"md5": "43e78e8d694a774948c9a241b46663f9",
"sha256": "8a2450a095b9ccbb5801b3e8d7c7a336d3a1d37829f9fdad24692a13636bc349"
},
"downloads": -1,
"filename": "stellar_account_prometheus_exporter-0.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "43e78e8d694a774948c9a241b46663f9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9454,
"upload_time": "2025-07-28T16:46:57",
"upload_time_iso_8601": "2025-07-28T16:46:57.482323Z",
"url": "https://files.pythonhosted.org/packages/d9/eb/dfc45adbd72cf025942397b24d29427905c12d25c0117e1b3c550a893f92/stellar_account_prometheus_exporter-0.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4dc245e90b397c61c9dbb6af6bf81a18fd89d78dc03aafecafe719beccab028d",
"md5": "0bcf5b5fa3ea64b066abe945e569818f",
"sha256": "fa1cc95320068b141ad906e582a31be9110582a77fbb31d2075314c2c36f195d"
},
"downloads": -1,
"filename": "stellar-account-prometheus-exporter-0.0.8.tar.gz",
"has_sig": false,
"md5_digest": "0bcf5b5fa3ea64b066abe945e569818f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8946,
"upload_time": "2025-07-28T16:46:58",
"upload_time_iso_8601": "2025-07-28T16:46:58.475368Z",
"url": "https://files.pythonhosted.org/packages/4d/c2/45e90b397c61c9dbb6af6bf81a18fd89d78dc03aafecafe719beccab028d/stellar-account-prometheus-exporter-0.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 16:46:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "stellar",
"github_project": "stellar-account-prometheus-exporter",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "stellar-account-prometheus-exporter"
}