mirror of
https://github.com/luxfi/monitoring.git
synced 2026-10-30 15:24:48 +00:00
luxd serves chain APIs under one segment from constants.ChainAliasPrefix (constants v1.6.4, node v1.36.181), and the health service moved onto typed ops. Published addresses now match what a node answers on: /v1/bc/<alias>/... -> /v1/chain/<alias>/... /ext/bc/<alias>/... -> /v1/chain/<alias>/... /v1/health -> /v1/health/ops/health (full report) /v1/health/liveness -> /v1/health/ops/liveness /v1/health/readiness -> /v1/health/ops/readiness Observations keep their original addresses: a dated note or a recorded status code is a fact about when it was written, not an instruction to follow.
3.8 KiB
3.8 KiB
Lux Network Monitoring Stack
Comprehensive monitoring solution for Lux Network with Grafana, Prometheus, and Loki.
Components
- Grafana (Port 3100): Visualization and dashboards
- Prometheus (Port 9090): Metrics collection and storage
- Loki (Port 3101): Log aggregation
- Promtail: Log collection agent
- Node Exporter (Port 9100): System metrics
- Postgres Exporter (Port 9187): Database metrics
- Alertmanager (Port 9093): Alert management
Quick Start
# Start the monitoring stack
cd /home/z/work/lux/monitoring
./start-monitoring.sh
# Deploy nginx configuration for monitor.lux.network
./deploy-monitor-nginx.sh
Access Points
Local Access
- Grafana: http://localhost:3100 (admin/luxnetwork)
- Prometheus: http://localhost:9090
- Loki: http://localhost:3101
- Alertmanager: http://localhost:9093
Public Access (via nginx/Cloudflare)
- Grafana: https://monitor.lux.network
What's Monitored
Blockchain Metrics
- C-Chain (EVM): Block height, processing rate, rejection rate, RPC metrics
- P-Chain (Platform): Block height, validator info, staking metrics
- X-Chain (DEX/Assets): Block height, transaction metrics, asset transfers
System Metrics
- CPU, Memory, Disk usage
- Network I/O
- Process statistics
Application Metrics
- Blockscout explorer performance
- PostgreSQL database metrics
- Docker container statistics
Logs
- Lux node logs
- Docker container logs
- System logs
Dashboards
Pre-configured Dashboards
- Lux Network Comprehensive - Overview of all chains
- C-Chain Dashboard - Detailed C-Chain metrics
- P-Chain Dashboard - Platform chain monitoring
- X-Chain Dashboard - Asset chain monitoring
- Machine Metrics - System resource usage
- Database Dashboard - PostgreSQL performance
- Logs Dashboard - Centralized log viewing
Importing Additional Dashboards
The existing dashboards in /monitoring/grafana/dashboards/ are automatically imported.
Alerts
Configured alerts include:
- Node down detection
- Chain sync issues
- High block rejection rates
- Low peer count
- Resource usage warnings
- Database connectivity
Configuration Files
compose.luxnet.yml- Docker Compose configurationprometheus/prometheus.yml- Prometheus scrape configsprometheus/alerts/*.yml- Alert rulesloki/loki-config.yml- Loki configurationpromtail/promtail-config.yml- Log collection configgrafana/provisioning/- Grafana auto-provisioning
Maintenance
View Logs
docker-compose -f compose.luxnet.yml logs -f
Restart Services
docker-compose -f compose.luxnet.yml restart [service-name]
Stop Monitoring
docker-compose -f compose.luxnet.yml down
Update Configuration
- Edit the relevant config file
- Restart the affected service
- Verify changes in Grafana
Troubleshooting
No metrics showing
- Check if Lux node is running:
curl http://localhost:9650/v1/health/ops/health - Verify Prometheus targets: http://localhost:9090/targets
- Check container logs:
docker-compose -f compose.luxnet.yml logs prometheus
Cannot access Grafana
- Check if container is running:
docker ps | grep lux-grafana - Verify port 3100 is not in use:
netstat -tulpn | grep 3100 - Check nginx configuration if using monitor.lux.network
High memory usage
- Adjust retention in
prometheus.yml:--storage.tsdb.retention.time=15d - Configure Loki retention in
loki-config.yml - Limit log ingestion in Promtail config
Integration with Production
The monitoring stack integrates with your existing infrastructure:
- Uses
hanzo-networkfor database access - Monitors all running Blockscout instances
- Collects logs from Docker containers
- Tracks Lux node performance