A monitoring stack for tracking metrics and performance of Gnoland using Grafana, Prometheus, and a custom metrics processor.
- Pre-requisites
- Features
- Quick Start
- Configuration
- Usage
- Development
- Troubleshooting
- Contributing
- License
Before using this GnoLand Monitor, ensure that you have the following:
- Go (v1.19 or later)
- Docker (v20.10 or later)
- Docker Compose (v2.0 or later)
- Make
- Git
- Real-time Metrics: Collect and visualize node performance metrics in real-time
- Grafana: Pre-configured Grafana dashboard for comprehensive monitoring
- Transaction Indexing: GraphQL-based transaction indexer for easy querying and analysis
- Supernova Integration: Built-in support for Supernova node for network interaction
- Dockerized Setup: Easy deployment and management using Docker Compose
Clone the repository:
git clone https://github.com/noamstrauss/gnoland-monitor.git
cd gnoland-monitor
Configure environment variables (optional):
cp .env.example .env
# Edit .env file with your preferred settings
Start the services:
make up
Access Grafana Dashboard:
URL: http://localhost:3000/d/gno-node-monitoring
Stop the services:
make down
Gnoland Monitor consists of the following components:
- Gnoland Node: Core Gnoland blockchain node
- Transaction Indexer: GraphQL service for indexing and querying transactions
- Metrics Processor: Custom Go service that processes and exposes Prometheus metrics
- Supernova: Tool for generating test transactions and network load
- Prometheus: Time-series database for storing metrics
- Grafana: Visualization platform with pre-configured dashboards
You can customize the behavior of Gnoland Monitor using the following environment variables:
Variable | Description | Default Value |
---|---|---|
SUB_ACCOUNTS | Number of sub-accounts to monitor | 5 |
TRANSACTIONS | Number of transactions to generate | 100 |
MNEMONIC | Mnemonic for account generation | source bonus chronic... |
OUTPUT_FILE | Output file for transaction results | result.json |
NODE_PORT | Gnoland node port | 26657 |
INDEXER_PORT | Transaction indexer port | 8546 |
METRICS_PORT | Metrics processor port | 8080 |
GRAFANA_PORT | Grafana dashboard port | 3000 |
PROMETHEUS_PORT | Prometheus port | 9090 |
PROCESSING_INTERVAL | Metrics processing interval | 5s |
DB_PATH | Path to indexer database | /data/indexer-db |
PROMETHEUS_VERSION | Prometheus version | v3.2.0 |
GRAFANA_VERSION | Grafana version | 11.5.2 |
For easier configuration, you can create a .env
file in the project root with your desired settings:
#Node Configuration
SUB_ACCOUNTS=10
TRANSACTIONS=200
MNEMONIC=your custom mnemonic here
OUTPUT_FILE=custom-result.json
# Service Ports
NODE_PORT=26657
INDEXER_PORT=8546
METRICS_PORT=8080
GRAFANA_PORT=3000
PROMETHEUS_PORT=9090
# Other Settings
PROCESSING_INTERVAL=10s
DB_PATH=/data/indexer-db
PROMETHEUS_VERSION=v3.2.0
GRAFANA_VERSION=11.5.2
make build - Build all Docker images
make up - Start all services with default config
make up SUB_ACCOUNTS=10 ... - Start with custom config
make down - Stop all services
make restart - Restart all services
make logs [service=name] - View logs
make status - Check service status
make clean - Clean up everything
After starting the services, you can access them at the following URLs:
- Gnoland Node: http://localhost:26657
- Transaction Indexer: http://localhost:8546/graphql
- Metrics Endpoint: http://localhost:8080/metrics
- Grafana Dashboard: http://localhost:3000/d/gno-node-monitoring
- Prometheus UI: http://localhost:9090
To build and run the metrics-processor service locally:
cd metrics-processor
go build -o metrics-processor
./metrics-processor
To modify the Grafana dashboards:
- Access the Grafana UI at http://localhost:3000
- Make your changes to the dashboard
- Export the dashboard to JSON
- Save the JSON to
grafana/provisioning/dashboards/gnoland-dashboard.json
- Rebuild and restart the services: make restart
Common issues and their solutions:
- Services failing to start: Check logs with make logs to identify the specific issue
- Cannot connect to Grafana: Ensure ports are not in use by other applications
- No metrics showing up: Verify that the metrics-processor is healthy with make status
- Database errors: Try make clean to reset all data volumes
Contributions are welcome! Please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Follow the project's coding style.
- Submit a pull request with a clear description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.