-
Notifications
You must be signed in to change notification settings - Fork 57
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
What if wireguard is also running in docker #58
Comments
I am also curious about this. I'm running a standalone wireguard pod in my k8s cluster. It would be nice to be able to monitor with this exporter |
My solution as for now is a multi stage build (mine has also the complexity to build the exporter for arm)... FROM ghcr.io/linuxserver/wireguard as wireguard
FROM wireguard
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN ~/.cargo/bin/cargo install prometheus_wireguard_exporter
RUN cp /root/.cargo/bin/prometheus_wireguard_exporter /
WORKDIR /
# copy runscript in
#
COPY /root /
EXPOSE 9586/tcp root/etc/services.d/prometheus_wireguard_exporter/run:
|
@logopk not solving the issue, but #63 should take care of cross building the images for all ARM architectures, so you should now be able to just COPY --from=MindFlavor/prometheus_wireguard_exporter /usr/local/bin/prometheus_wireguard_exporter /usr/local/bin/ to your image for it to work, without having to compile anything. You might want to subscribe to #48 to get updates on that. |
Thank you @qdm12 that’s great. |
@logopk you can try now with: COPY --from=mindflavor/prometheus-wireguard-exporter:multi-arch-dockerfile /usr/local/bin/prometheus_wireguard_exporter /usr/local/bin/ and it should work 👍 Regarding the actual issue, anyone has tried to run the exporter with |
I have tried Both containers are running in the same stack. Any suggestions? This is the
|
PROMETHEUS_WIREGUARD_EXPORTER_PREPEND_SUDO_ENABLED=true after adding this env it worked
|
My setup is running wireguard in a docker container managed with docker-compose
Apparently the wg-interfaces are not available on the host, so your container isn't reading them.
Any suggestions how to fix this?
Peter
The text was updated successfully, but these errors were encountered: