i2pd-exporter-1.2.3 is not a library.
Visit the last successful build:
i2pd-exporter-2.2.0
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
Static Linux (Docker)
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_statusi2p_router_version_info{version}i2p_router_uptime_secondsi2p_router_bandwidth_inbound_bytes_per_second{interval}i2p_router_bandwidth_outbound_bytes_per_second{interval}i2p_router_network_status_codei2p_router_tunnels_participatingi2p_router_netdb_activepeersi2p_router_netdb_knownpeersi2pd_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: