Skip to content
yggdrasil-networkPublic

About

Prometheus exporter for Yggdrasil

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yggprom

Prometheus exporter for Yggdrasil peer status, traffic totals and rates, latency, cost, and uptime.

Usage

Requires Go 1.24+ and access to a running Yggdrasil node's UNIX admin socket.

go build -o yggprom .
./yggprom -name my-node -listen 127.0.0.1:9000

Serves metrics over HTTP at /.

Flag Description Default Required
-name Node label value default No
-listen TCP listen address :0 (any available port) No
-admin UNIX admin socket path /var/run/yggdrasil/yggdrasil.sock No

Metrics

Metrics are collected from Yggdrasil's getPeers admin API on each scrape. TX and RX are relative to the local node.

Metric Meaning
yggdrasil_peer_up Connection status: 1 connected, 0 disconnected.
yggdrasil_peer_tx_total_bytes Total bytes sent over the current connection.
yggdrasil_peer_rx_total_bytes Total bytes received over the current connection.
yggdrasil_peer_tx_rate_bytes Current send rate in bytes per second, reported by Yggdrasil.
yggdrasil_peer_rx_rate_bytes Current receive rate in bytes per second, reported by Yggdrasil.
yggdrasil_peer_latency_ms Peer round-trip latency in milliseconds.
yggdrasil_peer_cost Yggdrasil routing cost for the peer; lower values are preferred.
yggdrasil_peer_uptime_secs Current connection uptime in seconds.

Connected peers have labels node (from -name), peer (URI), dir (inbound or outbound), and key (peer public key). Disconnected peers emit only yggdrasil_peer_up{peer="…"} 0. Traffic totals and uptime reset on reconnection.

Prometheus

scrape_configs:
  - job_name: yggdrasil
    metrics_path: /
    static_configs:
      - targets: ['127.0.0.1:9000']

About

Prometheus exporter for Yggdrasil

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages