Package Exports
- substreams-sink-prometheus
- substreams-sink-prometheus/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (substreams-sink-prometheus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Substreams
Prometheus CLI Node.js
substreams-sink-prometheus
is a tool that allows developers to pipe data extracted metrics from a blockchain into a Prometheus time series database.
📖 Documentation
https://www.npmjs.com/package/substreams-sink-prometheus
Further resources
Protobuf
CLI
- MacOS
- Linux
- Windows
Install globally via npm
$ npm install -g substreams-sink-prometheus
Run
Usage: substreams-sink-prometheus run [options] [<manifest>] <module_name>
Substreams Prometheus sink module
Arguments:
<manifest> URL or IPFS hash of Substreams package
module_name Name of the output module (declared in the manifest)
Options:
-e --substreams-endpoint <string> Substreams gRPC endpoint to stream data from (default:
"https://mainnet.eth.streamingfast.io:443")
-s --start-block <int> Start block to stream from (defaults to -1, which means
the initialBlock of the first module you are streaming)
-t --stop-block <string> Stop block to end stream at, inclusively
--substreams-api-token <string> API token for the substream endpoint
--substreams-api-token-envvar <string> Environnement variable name of the API token for the
substream endpoint (default: "SUBSTREAMS_API_TOKEN")
--delay-before-start <int> [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")
--cursor-file <string> cursor lock file (default: "cursor.lock")
--production-mode <bool> Enable Production Mode, with high-speed parallel
processing (default: true)
-p --port <int> Listens on port number. (default: "9102")
-a --address <string> Prometheus address to connect. (default: "localhost")
-h, --help display help for command
Open the browser at http://localhost:9102
Features
- Consume
*.spkg
from:- Load URL or IPFS
- Read from
*.spkg
local filesystem - Read from
substreams.yaml
local filesystem
- Prometheus metrics
- Handle
cursor
on restart (savescursor.lock
file on disk)