n0-computer / iroh

peer-2-peer that just works
https://iroh.computer
Apache License 2.0
2.61k stars 165 forks source link

metrics: allow configuring IP address & port for exposing metrics in iroh-relay #2739

Open missytake opened 2 months ago

missytake commented 2 months ago

Right now, iroh-relay exposes metrics to 127.0.0.1:9092.

To scrape metrics from iroh-relay hosts via wireguard, we need to expose the port to the wireguard network, other wireguard hosts can't see the metrics otherwise.

Maybe this could be added to the iroh-relay command via a --metrics 192.168.0.10:9093 command line flag?

Arqu commented 2 months ago

Glad people are running their own these days :) The relay already has a configuration mechanic, see this. The intent was to keep the CLI simple to reduce the surface area and provide a way for a quick way to run it. In general if you're running it as a service you would probably want to supply a full config file with everything fleshed out. That would also include the metrics_bind_addr.