4 stable releases
1.3.0 | Apr 24, 2025 |
---|---|
1.2.3 | Apr 22, 2025 |
1.2.0 | Apr 18, 2025 |
1.1.2 | Apr 15, 2025 |
#71 in HTTP server
502 downloads per month
25KB
341 lines
i2pd‑exporter
A tiny, pure‑Rust Prometheus exporter that surfaces metrics from the i2pd I2PControl JSON‑RPC API.
Highlights
- Polls I2PControl and serves metrics on :9600 (configurable).
- Negotiates API tokens automatically.
- Negligible memory & CPU footprint.
- Metrics cover router status, uptime, bandwidth, peers, tunnels and exporter version.
Quick start
cargo build --release # native build
./target/release/i2pd-exporter --version # Check version
./target/release/i2pd-exporter # Run the exporter
Static Linux (Docker)
./build-static-linux-docker.sh # outputs to ./dist/
Releases
GitHub releases include pre-compiled static Linux binaries (.tar.gz
) for x86_64
and aarch64
. Each release also provides a sha256sums.txt
file for verifying archive integrity.
Configuration
Variable | Default | Purpose |
---|---|---|
I2PCONTROL_ADDRESS |
https://127.0.0.1:7650 |
I2PControl endpoint (/jsonrpc appended) |
I2PCONTROL_PASSWORD |
itoopie |
I2PControl password (required) |
METRICS_LISTEN_ADDR |
0.0.0.0:9600 |
Address:port for metrics (9446 in Ansible) |
HTTP_TIMEOUT_SECONDS |
60 |
API request timeout (seconds) |
Metrics cheat‑sheet
i2p_router_status
i2p_router_version_info{version}
i2p_router_uptime_seconds
i2p_router_bandwidth_inbound_bytes_per_second{interval}
i2p_router_bandwidth_outbound_bytes_per_second{interval}
i2p_router_network_status_code
i2p_router_tunnels_participating
i2p_router_netdb_activepeers
i2p_router_netdb_knownpeers
i2pd_exporter_version_info{version}
systemd unit (example)
[Unit]
Description=I2Pd Control Metrics Exporter
Requires=i2pd.service
After=i2pd.service
[Service]
Type=simple
ExecStart=/usr/local/bin/i2pd-exporter
Environment="I2PCONTROL_ADDRESS=https://127.0.0.1:7650"
Environment="I2PCONTROL_PASSWORD=YOUR_I2PD_CONTROL_PASSWORD"
Environment="METRICS_LISTEN_ADDR=0.0.0.0:9446"
Environment="RUST_LOG=info"
Restart=on-failure
RestartSec=10
User=i2pd
Group=i2pd
[Install]
WantedBy=multi-user.target
Enable and launch:
sudo systemctl enable i2pd-exporter.service
sudo systemctl start i2pd-exporter.service
sudo systemctl status i2pd-exporter.service
Dependencies
~12–25MB
~372K SLoC