-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple IP addreses #8
Comments
You are indeed right, I haven't considered the possibility of allowing multiple IP addresses 🤦♂️ . I can fix this but I do not know how to express multiple IPs as Prometheus label(s). Should we drop the @schoentoon what do you think we should do? I'm partial for the first approach. |
I have a working solution based on the second approach. Please check out if it solves your problem! |
The second approach seems better for users with only one or two ip addresses, but the first option would be better for people with a lot of ip addresses. Maybe make it configurable? |
Makes perfect sense. I will implement the second approach behind a startup flag. |
ok in #9 I've implemented your suggestions. Let me know if it's ok by you! |
Deployed it on my infrastructure and instantly looks a lot better. I'll have to tweak my grafana dashboards a bit now, but that's just a detail 😅 |
I have my wireguard configured to allow for multiple ip addresses per peer (generally ipv4 and ipv6). This is simply done like this
However the eventual prometheus labels don't seem to pick up on this all too well. As I get the following labels:
wireguard_sent_bytes_total{inteface="wg0", public_key="<snip>", local_ip="10.0.0.2", local_subnet="32,fd86:ea04:::2"}
It seems to me that it is doing a simple split on the
/
and just uses the entire output after that as the local subnet.The text was updated successfully, but these errors were encountered: