I have VM instance running on Azure with Ubuntu 22.04. It is a Wireguard VPN server. I want to setup Prometheus with Wireguard exporter to monitor the network. I can SSH into VM with SSH keys.
What I understood to use friendly_name I had to run the container with the options. So I could do something like:
docker run -d --privileged --net=host --cap-add=NET_ADMIN --name wgexporter mindflavor/prometheus-wireguard-exporter -d true -a true -v true
Above is working fine and I can do curl http:/localhost:9586/metrics and I can see metrics. I want to use _friendlyname feature. So I had to run the container with -n /path/to/wg0.config. At the same time I had to mount the /etc/wireguard to the container with -v /etc/wireguard:/etc/wireguard. So the overall command is:
I gave all the necessary permission to the config file. I can see that the /etc/wireguard directory mounted on to the container as I can cd into it. I am still not able to solve this problem. Any help would be appreciated.
I have VM instance running on Azure with Ubuntu 22.04. It is a Wireguard VPN server. I want to setup Prometheus with Wireguard exporter to monitor the network. I can SSH into VM with SSH keys.
What I understood to use friendly_name I had to run the container with the options. So I could do something like:
Above is working fine and I can do
curl http:/localhost:9586/metrics
and I can see metrics. I want to use _friendlyname feature. So I had to run the container with-n /path/to/wg0.config
. At the same time I had to mount the /etc/wireguard to the container with-v /etc/wireguard:/etc/wireguard
. So the overall command is:Container runs without any errors. But I can not
curl http:/localhost:9586/metrics
. It gives me an error:failed to read peer config file
I checked
docker logs wgexporter
outputs follwing:I gave all the necessary permission to the config file. I can see that the /etc/wireguard directory mounted on to the container as I can
cd
into it. I am still not able to solve this problem. Any help would be appreciated.