{"id":13709852,"url":"https://github.com/pinax-network/substreams-sink-prometheus","last_synced_at":"2026-05-10T08:45:49.148Z","repository":{"id":95714141,"uuid":"608384971","full_name":"pinax-network/substreams-sink-prometheus","owner":"pinax-network","description":"Substreams Prometheus CLI Node.js","archived":false,"fork":false,"pushed_at":"2024-03-13T06:05:26.000Z","size":34845,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-26T09:07:45.460Z","etag":null,"topics":["pinax","streamingfast","substreams","thegraph"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/substreams-sink-prometheus","language":"TypeScript","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/pinax-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2023-03-01T22:51:45.000Z","updated_at":"2023-07-18T09:23:39.000Z","dependencies_parsed_at":"2023-05-28T15:00:40.066Z","dependency_job_id":"93c84977-610a-4669-b5d1-a1e597fc338c","html_url":"https://github.com/pinax-network/substreams-sink-prometheus","commit_stats":{"total_commits":133,"total_committers":3,"mean_commits":"44.333333333333336","dds":"0.29323308270676696","last_synced_commit":"7fe3da1c456309b158645b72f0c46e705f230102"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-sink-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-sink-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-sink-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-sink-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinax-network","download_url":"https://codeload.github.com/pinax-network/substreams-sink-prometheus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582552,"owners_count":19985845,"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":["pinax","streamingfast","substreams","thegraph"],"created_at":"2024-08-02T23:00:47.163Z","updated_at":"2026-05-10T08:45:49.066Z","avatar_url":"https://github.com/pinax-network.png","language":"TypeScript","funding_links":[],"categories":["Substreams Sinks"],"sub_categories":["Firehose"],"readme":"# [`Substreams`](https://substreams.streamingfast.io/) [Prometheus](https://prometheus.io/) CLI `Node.js`\n\n[\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/Github-substreams.prometheus-8da0cb?style=for-the-badge\u0026logo=github\" height=\"20\"\u003e](https://github.com/pinax-network/substreams-sink-prometheus)\n[\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/substreams-sink-prometheus.svg?style=for-the-badge\u0026color=CB0001\u0026logo=npm\" height=\"20\"\u003e](https://www.npmjs.com/package/substreams-sink-prometheus)\n[\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/pinax-network/substreams-sink-prometheus/ci.yml?branch=main\u0026style=for-the-badge\" height=\"20\"\u003e](https://github.com/pinax-network/substreams-sink-prometheus/actions?query=branch%3Amain)\n\n\u003e `substreams-sink-prometheus` is a tool that allows developers to pipe data extracted metrics from a blockchain into a Prometheus time series database.\n\n## 📖 Documentation\n\n### https://www.npmjs.com/package/substreams-sink-prometheus\n\n### Further resources\n\n- [**Substreams** documentation](https://substreams.streamingfast.io)\n- [**Prometheus** documentation](https://prometheus.io)\n- [**Substreams Sink Prometheus** `Rust`](https://github.com/pinax-network/substreams-sink-prometheus.rs)\n\n### Protobuf\n\n- [`pinax.substreams.sink.prometheus.v1.PrometheusOperations`](https://github.com/pinax-network/substreams-sink-prometheus.rs/blob/main/proto/substreams/sink/prometheus/v1/prometheus.proto)\n\n## Docker environment\n\nPull from GitHub Container registry\n```bash\ndocker pull ghcr.io/pinax-network/substreams-sink-prometheus:latest\n```\n\nBuild from source\n```bash\ndocker build -t substreams-sink-prometheus .\n```\n\nRun with `.env` file\n```bash\ndocker run -it --rm --env-file .env substreams-sink-prometheus run\n```\n\n**Install** globally via npm\n```\n$ npm install -g substreams-sink-prometheus\n```\n\n**Run**\n\n```console\nSubstreams Prometheus sink module\n\nOptions:\n  -e --substreams-endpoint \u003cstring\u003e    Substreams gRPC endpoint to stream data from (env: SUBSTREAMS_ENDPOINT)\n  --manifest \u003cstring\u003e                  URL of Substreams package (env: MANIFEST)\n  --module-name \u003cstring\u003e               Name of the output module (declared in the manifest) (env: MODULE_NAME)\n  -s --start-block \u003cint\u003e               Start block to stream from (defaults to -1, which means the initialBlock of the first module you are streaming) (default: \"-1\", env: START_BLOCK)\n  -t --stop-block \u003cint\u003e                Stop block to end stream at, inclusively (env: STOP_BLOCK)\n  -p, --params \u003cstring...\u003e             Set a params for parameterizable modules. Can be specified multiple times. (ex: -p module1=valA -p module2=valX\u0026valY) (default: [], env: PARAMS)\n  --substreams-api-token \u003cstring\u003e      API token for the substream endpoint (default: \"\", env: SUBSTREAMS_API_TOKEN)\n  --delay-before-start \u003cint\u003e           [OPERATOR] Amount of time in milliseconds (ms) to wait before starting any internal processes, can be used to perform to maintenance on the pod before actually letting it starts (default: 0,\n                                       env: DELAY_BEFORE_START)\n  --cursor-file \u003cstring\u003e               Cursor lock file (default: \"cursor.lock\", env: CURSOR_FILE)\n  --disable-production-mode            Disable production mode, allows debugging modules logs, stops high-speed parallel processing (default: true, env: PRODUCTION_MODE)\n  --restart-inactivity-seconds \u003cint\u003e   If set, the sink will restart when inactive for over a certain amount of seconds (default: 60, env: RESTART_INACTIVITY_SECONDS)\n  --hostname \u003cstring\u003e                  The process will listen on this hostname for any HTTP and Prometheus metrics requests (default: \"localhost\", env: HOSTNAME)\n  --port \u003cint\u003e                         The process will listen on this port for any HTTP and Prometheus metrics requests (default: 9102, env: PORT)\n  --metrics-labels [string...]         To apply generic labels to all default metrics (ex: --labels foo=bar) (default: {}, env: METRICS_LABELS)\n  --collect-default-metrics \u003cboolean\u003e  Collect default metrics (default: false, env: COLLECT_DEFAULT_METRICS)\n  --verbose                            Enable verbose logging (default: false, env: VERBOSE)\n  -h, --help                           display help for command\n```\n\n\u003e Open the browser at [http://localhost:9102](http://localhost:9102)\n\n## Features\n\n- [x] Consume `*.spkg` from:\n  - [x] Load URL or IPFS\n  - [x] Read from `*.spkg` local filesystem\n  - [x] Read from `substreams.yaml` local filesystem\n- [x] Prometheus metrics\n  - [x] COUNTER\n  - [x] GAUGE\n  - [ ] ~~HISTOGRAM~~\n  - [ ] ~~SUMMARY~~\n- [x] Handle `cursor` on restart (saves `cursor.lock` file on disk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Fsubstreams-sink-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinax-network%2Fsubstreams-sink-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Fsubstreams-sink-prometheus/lists"}