{"id":30715915,"url":"https://github.com/bryanlabs/cometbft-height-exporter","last_synced_at":"2025-09-03T07:09:56.699Z","repository":{"id":298587642,"uuid":"1000448734","full_name":"bryanlabs/cometbft-height-exporter","owner":"bryanlabs","description":"a small app to export heights from comet nodes","archived":false,"fork":false,"pushed_at":"2025-08-07T00:13:58.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-07T01:06:33.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bryanlabs.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-11T19:55:17.000Z","updated_at":"2025-08-07T00:14:02.000Z","dependencies_parsed_at":"2025-06-11T22:28:04.659Z","dependency_job_id":"3da43505-99c1-447f-8b2a-c28f867b788e","html_url":"https://github.com/bryanlabs/cometbft-height-exporter","commit_stats":null,"previous_names":["bryanlabs/cometbft-height-exporter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bryanlabs/cometbft-height-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlabs%2Fcometbft-height-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlabs%2Fcometbft-height-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlabs%2Fcometbft-height-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlabs%2Fcometbft-height-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryanlabs","download_url":"https://codeload.github.com/bryanlabs/cometbft-height-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanlabs%2Fcometbft-height-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273404436,"owners_count":25099407,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-09-03T07:09:55.328Z","updated_at":"2025-09-03T07:09:56.679Z","avatar_url":"https://github.com/bryanlabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CometBFT Height Exporter\n\nA Prometheus exporter for monitoring the latest block height and sync status of trusted reference nodes for multiple Cosmos SDK-based blockchains.\n\n## Features\n- Scrapes `/status` endpoints from trusted nodes for each configured chain\n- Exposes latest block height, block time, and sync status as Prometheus metrics\n- Aggregates block height across nodes (max/mean)\n- Robust error handling and logging (TEXT or JSON)\n- Health check endpoint for Kubernetes\n- Production-ready: Docker, CI, and K8s friendly\n\n## Configuration\nEdit `config.yaml`:\n```yaml\nchains:\n  thorchain-1:\n    - https://rpc.ninerealms.com\n    - https://thornode-mainnet-rpc.bryanlabs.net\n  cosmoshub-4:\n    - https://cosmos-rpc.polkachu.com\n  osmosis-1:\n    - https://osmosis-rpc.polkachu.com\n  kaiyo-1:\n    - https://kujira-rpc.polkachu.com\n  noble-1:\n    - https://noble-rpc.polkachu.com\n  columbus-5:\n    - https://terra-rpc.bryanlabs.net\n  phoenix-1:\n    - https://terra-rpc.polkachu.com\ninterval: 15  # seconds\naggregation: max  # or 'mean'\nlog_format: json  # or 'json'\nlog_level: INFO  # or DEBUG, WARNING, ERROR\n```\n\n## Usage\nInstall dependencies:\n```sh\npip install -r requirements.txt\n```\nRun the exporter:\n```sh\npython exporter.py --config config.yaml --port 8000 --healthz-port 8001\n```\n\n## Endpoints\n- `/metrics` (default :8000): Prometheus scrape endpoint\n- `/healthz` (default :8001): Health check (returns `ok`)\n\n## Metrics\n- `blockchain_latest_block_height{node,network}`\n- `blockchain_sync_catching_up{node,network}`\n- `blockchain_latest_block_time{node,network}`\n- `blockchain_latest_block_height_max{network}`\n- `blockchain_latest_block_height_mean{network}`\n\n## Docker\nBuild and run:\n```sh\ndocker build -t cometbft-height-exporter .\ndocker run -p 8000:8000 -p 8001:8001 -v $(pwd)/config.yaml:/app/config.yaml cometbft-height-exporter\n```\n\n## Kubernetes\nAdd a liveness/readiness probe:\n```yaml\nlivenessProbe:\n  httpGet:\n    path: /healthz\n    port: 8001\n  initialDelaySeconds: 5\n  periodSeconds: 10\n```\n\n## CI/CD\nA GitHub Actions workflow (`.github/workflows/docker.yml`) is included for linting, building, and publishing multi-arch Docker images to GitHub Container Registry (GHCR).\n\n---\n\n**Questions or contributions welcome!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanlabs%2Fcometbft-height-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryanlabs%2Fcometbft-height-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanlabs%2Fcometbft-height-exporter/lists"}