Skip to content

feat: Prometheus Metrics Exporter (Bounty #765)#1

Open
sososonia-cyber wants to merge 2 commits intomainfrom
feat/prometheus-metrics-bounty-765
Open

feat: Prometheus Metrics Exporter (Bounty #765)#1
sososonia-cyber wants to merge 2 commits intomainfrom
feat/prometheus-metrics-bounty-765

Conversation

@sososonia-cyber
Copy link
Owner

Summary

Implements Prometheus Metrics Exporter for RustChain node monitoring.

Features

  • GET /metrics endpoint returning Prometheus format
  • Core metrics: epoch, miners, balances, uptime
  • Node health and DB status
  • Per-miner metrics with hardware/architecture grouping
  • Average antiquity multiplier tracking

Milestones Completed

  • Metrics endpoint - GET /metrics returns Prometheus format (20 RTC)
  • Core metrics - epoch, miners, balances, uptime (included)
  • Per-miner metrics - hardware type, architecture, antiquity (bonus)

Files Changed

  • monitoring/rustchain-exporter.py - Main exporter
  • monitoring/prometheus.yml - Prometheus config
  • monitoring/Dockerfile.exporter - Docker setup

Testing

Tested against RustChain node at https://50.28.86.131

Closes #765

sososonia-cyber added 2 commits March 7, 2026 15:13
- Query all 3 RustChain nodes
- Compare balances, epochs
- Merkle root verification
- SQLite historical tracking
- Webhook alerting
- CI mode support

Reward: up to 75 RTC
- Added comprehensive Prometheus metrics:
  - Node health (up, uptime, version)
  - Epoch state (current, slot, enrolled miners, pot)
  - Miner metrics (active, total, attestation age)
  - Balance metrics (total supply)
  - Database metrics (size, backup age)
  - API performance histogram

- Added Grafana dashboard with 8 panels:
  - Node status gauge
  - Uptime timeseries
  - Current epoch/enrolled miners
  - Miners overview
  - Database size
  - Total supply
  - API latency

- Added Prometheus alert rules:
  - Node down
  - Epoch stuck
  - Database growth
  - No active miners
  - Low enrolled miners
  - High API latency
  - Backup too old

Rewards: 20-50 RTC (pending milestones)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant