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

Support for multiple PROMETHEUS_WIREGUARD_EXPORTER_CONFIG_FILE_NAMES entries #130

Open
DST73 opened this issue Oct 11, 2024 · 0 comments
Open

Comments

@DST73
Copy link

DST73 commented Oct 11, 2024

The wireguard version that I use (from open media vault) creates for each client its own config.file

grafik

Is there a way too define multiple config files for PROMETHEUS_WIREGUARD_EXPORTER_CONFIG_FILE_NAMES?

With the docker-compose I get this error

[2024-10-11T09:38:54Z WARN prometheus_exporter_base] internal server error == failed to read peer config file
Caused by:
No such file or directory (os error 2)

This is how my docker-compose looks like
version: '3.9'
services:
prometheus-wireguard-exporter:
image: mindflavor/prometheus-wireguard-exporter
container_name: wgexporter
command: -a true
cap_add:
- NET_ADMIN
network_mode: host
ports:
- '9586:9586'
volumes:
- type: bind
source: /etc/wireguard/wgnet_client1.conf
target: /etc/wireguard/wgnet_client1.conf
- type: bind
source: /etc/wireguard/wgnet_client2.conf
target: /etc/wireguard/wgnet_client2.conf
environment:
- PROMETHEUS_WIREGUARD_EXPORTER_EXPORT_REMOTE_IP_AND_PORT_ENABLED=true
- PROMETHEUS_WIREGUARD_EXPORTER_CONFIG_FILE_NAMES=/etc/wireguard/wgnet_client1.conf;/etc/wireguard/wgnet_client2.conf
- EXPORT_LATEST_HANDSHAKE_DELAY=true
logging:
driver: "json-file"
options:
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"

Thank you!

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

No branches or pull requests

1 participant