{"id":18417392,"url":"https://github.com/stellar/stellar-account-prometheus-exporter","last_synced_at":"2025-04-07T12:32:27.022Z","repository":{"id":45597730,"uuid":"198108181","full_name":"stellar/stellar-account-prometheus-exporter","owner":"stellar","description":"Stellar Account Prometheus Exporter - Monitor Stellar Network Accounts","archived":false,"fork":false,"pushed_at":"2024-07-22T05:22:59.000Z","size":61,"stargazers_count":3,"open_issues_count":1,"forks_count":8,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-22T18:41:27.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stellar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-07-21T21:44:32.000Z","updated_at":"2024-07-17T09:01:11.000Z","dependencies_parsed_at":"2023-11-24T07:28:36.730Z","dependency_job_id":"e8548db3-b098-4f91-94ce-70bd908346f9","html_url":"https://github.com/stellar/stellar-account-prometheus-exporter","commit_stats":{"total_commits":43,"total_committers":5,"mean_commits":8.6,"dds":0.6511627906976745,"last_synced_commit":"1f2341caae57c8ebc59926a6297a5378b3ae5e72"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fstellar-account-prometheus-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fstellar-account-prometheus-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fstellar-account-prometheus-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fstellar-account-prometheus-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stellar","download_url":"https://codeload.github.com/stellar/stellar-account-prometheus-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247653226,"owners_count":20973785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T04:09:15.730Z","updated_at":"2025-04-07T12:32:22.011Z","avatar_url":"https://github.com/stellar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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 \u003cyour tag\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fstellar-account-prometheus-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstellar%2Fstellar-account-prometheus-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fstellar-account-prometheus-exporter/lists"}