You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ML node service state: 0=STOPPED 1=INFERENCE 2=POW 3=TRAIN
gonka_node_disk_available_gb
participant, node_id, host
ML node model cache available disk space (GB)
Node GPU — Aggregated
Metric
Labels
Description
gonka_node_gpu_device_count
participant, node_id, host
Total GPU device count
gonka_node_gpu_avg_utilization_percent
participant, node_id, host
Average GPU utilization % across all devices
Node GPU — Per Device
Metric
Labels
Description
gonka_node_gpu_device_utilization_percent
participant, node_id, host, device_index
Per-device GPU compute utilization %
gonka_node_gpu_device_temperature_celsius
participant, node_id, host, device_index
Per-device GPU temperature (°C)
gonka_node_gpu_device_memory_total_mb
participant, node_id, host, device_index
Per-device total GPU memory (MB)
gonka_node_gpu_device_memory_used_mb
participant, node_id, host, device_index
Per-device used GPU memory (MB)
gonka_node_gpu_device_memory_free_mb
participant, node_id, host, device_index
Per-device free GPU memory (MB)
gonka_node_gpu_device_available
participant, node_id, host, device_index
Per-device availability (1=OK, 0=unavailable)
Pricing / Models
Metric
Labels
Description
gonka_pricing_unit_of_compute_price
—
Unit of compute price
gonka_pricing_dynamic_enabled
—
Dynamic pricing enabled (1/0)
gonka_pricing_model_price_per_token
model_id
Price per token per model
gonka_pricing_model_units_per_token
model_id
Compute units per token
gonka_model_v_ram
model_id
Model VRAM (GB)
gonka_model_throughput_per_nonce
model_id
Model throughput per nonce
gonka_model_validation_threshold
model_id
Model validation threshold
gonka_model_utilization_percent
model_id
Model utilization % (requires dynamic pricing enabled)
gonka_model_capacity
model_id
Model capacity in AI tokens/epoch (requires dynamic pricing enabled)
Running from source
git clone https://github.com/inc4/gonka-exporter-go
cd gonka-exporter-go
cp .env.example .env
nano .env
docker compose up -d --build
Project Structure
gonka-exporter-go/
├── cmd/exporter/main.go — entry point, HTTP server
├── internal/
│ ├── config/config.go — configuration from env vars
│ ├── fetcher/fetcher.go — HTTP requests to Gonka APIs (~500 lines, 20+ endpoints)
│ ├── metrics/metrics.go — Prometheus metric definitions (100+ metrics)
│ ├── state/state.go — persistent state and epoch history
│ └── collector/collector.go — collection orchestration (~650 lines)
├── docker-compose.yml — build from source
├── docker-compose.image.yml — run from pre-built image
└── Dockerfile
Epoch History
The exporter persists epoch history to /data/epoch_history.json. On restart, all historical metrics are restored automatically from this file. The current epoch state (start time, wallet balance at epoch start, block height) is persisted separately to /data/exporter_state.json.
To migrate history from a previous deployment:
docker run --rm \
-v <old-volume>:/old:ro \
-v gonka-exporter-go_epoch-data:/new \
alpine sh -c "cp /old/epoch_history.json /new/epoch_history.json"
docker compose restart gonka-exporter
On each collection cycle the exporter compares the current chain epoch against the previous value. When the epoch increments:
A full EpochSnapshot is saved to history (inferences, miss rate, earned/rewarded coins, PoC weights, wallet delta, estimated reward, on-chain claimed amount)
EpochState is updated with new epoch start values
All history metrics are re-registered with Prometheus from the snapshot