Task #6810
closedAdd a wireguard prometheus exporter to our infrastructure
0%
Description
Parse output from wg show and make it available for prometheus
- Export "up" vpns
- Export received/sent traffic
- Export latest handshake
Updated by Evil Ham over 5 years ago
This sounds more interesting to me than "IPv6 is down", but:
Nico Schottelius wrote:
Parse output from wg show and make it available for prometheus
- Export "up" vpns
I must assume this means a count? Aka: how many peers are defined? how many are up?
Prometheus docs advise against using "per-client" (in this case per-vpn) labels as that can badly kill performance.
- Export received/sent traffic
- Export latest handshake
Easily doable from:
wg show all dump
From man wg:
If dump is specified, then several lines are printed; the
first contains in order separated by tab: private-key, public-
key, listen-port, fwmark. Subsequent lines are printed for each
peer and contain in order separated by tab: public-key,
preshared-key, endpoint, allowed-ips, latest-handshake,
transfer-rx, transfer-tx, persistent-keepalive.
Updated by Nico Schottelius over 5 years ago
Re per-client: I see the "prometheus problem" - however it would be very interesting to see which client uses how much traffic / in out, which would help a lot for load balancing (i.e. move clients xyz to vpnserver A)
I wonder if there is a "nice" solution to this
Updated by Evil Ham over 5 years ago
Updated by Nico Schottelius over 5 years ago
- Subject changed from Create a wireguard prometheus exporter to Add a wireguard prometheus exporter to our infrastructure
Thanks for the hint Evilham!