Metrics Collection
Sui nodes expose Prometheus metrics on the metrics endpoint.Metrics Endpoint
By default, metrics are available at:Viewing Metrics
View all metrics:Key Metrics
Synchronization Metrics
Checkpoint ProgressConsensus Metrics (Validators)
Round and Commit MetricsPerformance Metrics
Database MetricsNetwork Metrics
P2P MetricsLogging
Log Configuration
Logs are controlled via environment variables:Log Levels
Available log levels (from most to least verbose):trace: Very detailed debugging informationdebug: Detailed debugging informationinfo: General informational messageswarn: Warning messageserror: Error messages
Viewing Logs
Systemd DeploymentDynamic Log Configuration
Change log levels at runtime using the admin interface:Prometheus Setup
Install Prometheus
Configure Prometheus
Createprometheus.yml:
Start Prometheus
http://localhost:9090.
Grafana Setup
Install Grafana
http://localhost:3000 (default login: admin/admin).
Add Prometheus Data Source
- Navigate to Configuration > Data Sources
- Click “Add data source”
- Select “Prometheus”
- Set URL to
http://localhost:9090 - Click “Save & Test”
Import Dashboards
Sui provides reference dashboards in the repository:- Click ”+” > “Import”
- Upload JSON file or paste content
- Select Prometheus data source
- Click “Import”
Using Docker Compose for Monitoring Stack
Createdocker-compose.monitoring.yaml:
Public Dashboards
View network-wide validator metrics: View validator stake and status:Alerting
Prometheus Alert Rules
Createalerts.yml:
Alertmanager Configuration
Createalertmanager.yml: