Skip to content
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

No output when peer config is split #22

Closed
vdebergue opened this issue Mar 20, 2020 · 5 comments
Closed

No output when peer config is split #22

vdebergue opened this issue Mar 20, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@vdebergue
Copy link

Hi,
I'm running the exporter with a separate peer file:

/usr/local/bin/prometheus_wireguard_exporter -n /etc/wireguard/peers.conf

This causes the exporter to believe that the interface is named peers whereas the correct name is wg0

My wg0.conf:

[Interface]
Address = <network>/24
PrivateKey = <private_key>
ListenPort = 51280
PostUp = wg addconf wg0 /etc/wireguard/peers.conf

This allows to split the configuration file in two and manage user configuration separately.

Maybe we could add an option on the command line that would take the precedence on the filename if specified ?

@MindFlavor MindFlavor added the enhancement New feature or request label Mar 28, 2020
@MindFlavor
Copy link
Owner

Yes it makes sense. 👍

@MindFlavor
Copy link
Owner

@vdebergue Can you please test the aforementioned PR and tell me how it goes? I've tested it on my env and it seems to work (with both single config file and splitted ones).

@vdebergue
Copy link
Author

I will try it next week, thanks.

@vdebergue
Copy link
Author

The new branch is working for my setup 👍

@MindFlavor
Copy link
Owner

Nice! Thank you for testing! As soon as I update the README I will merge the PR, publish it in crates.io and close this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants