Simple exporter used to scrape different metrics from EVM compatible websocket RPCs.
For list of metrics and explanations please check collect method in exporter source-code. For available labels please see metric_labels list in exporter source-code.
Please note that this tool is in early development stage, and as such should not be used to influence business crictical decisions. The project in it's current form suits our short-term needs and will receive limited support. We encourage you to fork the project, and extend it with additional functionality you might need. This project was inspired by blackbox-websocket-exporter
It is recommended that you install pre-commit so that automated linting and formatting checks are performed before each commit. Run:
pip install pre-commit
pre-commit install
- Make sure you have python3 installed (>3.9.10)
- Set-up your python environment
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
- Generate valid exporter config and validation file. For example see config example and validation example.
- Export paths of generated configuration files relative to
src/exporter.py
:
export VALIDATION_FILE_PATH="validation.yml" # For example if we saved validation config file in src/validation.yml
export CONFIG_FILE_PATH="config.yml" # For example if we saved config file in src/config.yml
- Finally you can run the exporter
python exporter.py
- Generate valid exporter config and validation file. For example see config example and validation example.
- Export paths of generated configuration files relative to
docker-compose.yml
:
export VALIDATION_FILE_PATH="src/validation.yml" # For example if we saved validation config file in src/validation.yml
export CONFIG_FILE_PATH="src/config.yml" # For example if we saved config file in src/config.yml
- Execute
docker-compose build
docker-compose-up
curl localhost:8000/metrics # Exporter
curl localhost:3000 # Grafana
curl localhost:9090 # Prometheus