0.7.11 • Published 2 months ago
substreams-sink-prometheus v0.7.11
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
Docker environment
Pull from GitHub Container registry
docker pull ghcr.io/pinax-network/substreams-sink-prometheus:latest
Build from source
docker build -t substreams-sink-prometheus .
Run with .env
file
docker run -it --rm --env-file .env substreams-sink-prometheus run
Install globally via npm
$ npm install -g substreams-sink-prometheus
Run
Substreams Prometheus sink module
Options:
-e --substreams-endpoint <string> Substreams gRPC endpoint to stream data from (env: SUBSTREAMS_ENDPOINT)
--manifest <string> URL of Substreams package (env: MANIFEST)
--module-name <string> Name of the output module (declared in the manifest) (env: MODULE_NAME)
-s --start-block <int> Start block to stream from (defaults to -1, which means the initialBlock of the first module you are streaming) (default: "-1", env: START_BLOCK)
-t --stop-block <int> Stop block to end stream at, inclusively (env: STOP_BLOCK)
-p, --params <string...> Set a params for parameterizable modules. Can be specified multiple times. (ex: -p module1=valA -p module2=valX&valY) (default: [], env: PARAMS)
--substreams-api-token <string> API token for the substream endpoint (default: "", env: 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,
env: DELAY_BEFORE_START)
--cursor-file <string> Cursor lock file (default: "cursor.lock", env: CURSOR_FILE)
--disable-production-mode Disable production mode, allows debugging modules logs, stops high-speed parallel processing (default: true, env: PRODUCTION_MODE)
--restart-inactivity-seconds <int> If set, the sink will restart when inactive for over a certain amount of seconds (default: 60, env: RESTART_INACTIVITY_SECONDS)
--hostname <string> The process will listen on this hostname for any HTTP and Prometheus metrics requests (default: "localhost", env: HOSTNAME)
--port <int> The process will listen on this port for any HTTP and Prometheus metrics requests (default: 9102, env: PORT)
--metrics-labels [string...] To apply generic labels to all default metrics (ex: --labels foo=bar) (default: {}, env: METRICS_LABELS)
--collect-default-metrics <boolean> Collect default metrics (default: false, env: COLLECT_DEFAULT_METRICS)
--verbose Enable verbose logging (default: false, env: VERBOSE)
-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
- COUNTER
- GAUGE
HISTOGRAMSUMMARY
- Handle
cursor
on restart (savescursor.lock
file on disk)
0.7.11
2 months ago
0.7.10
4 months ago
0.7.9
8 months ago
0.7.6
10 months ago
0.7.5
10 months ago
0.7.8
9 months ago
0.7.7
10 months ago
0.7.8-2
9 months ago
0.7.8-1
9 months ago
0.7.1
10 months ago
0.7.4
10 months ago
0.7.3
10 months ago
0.7.0
10 months ago
0.5.2
11 months ago
0.6.0
10 months ago
0.5.1
11 months ago
0.5.0
12 months ago
0.4.8
1 year ago
0.4.7
1 year ago
0.4.6
1 year ago
0.4.5
1 year ago
0.4.4
1 year ago
0.4.3
1 year ago
0.4.2
1 year ago
0.4.1
1 year ago
0.4.0
1 year ago
0.3.3
1 year ago
0.3.2
1 year ago
0.3.1
1 year ago
0.3.0
1 year ago
0.2.0
1 year ago
0.1.9
1 year ago
0.1.8-7
1 year ago
0.1.8-6
1 year ago
0.1.8-5
1 year ago
0.1.8-4
1 year ago
0.1.8-3
1 year ago
0.1.8-2
1 year ago
0.1.8-1
1 year ago
0.1.8
1 year ago