Skip to content

sathiraumesh/Prometheus-Wireguard-Exporter

Repository files navigation

Prometheus Wireguard Exporter

A simple minimalistic wireguard connection stats exporter for Prometheus.

Usage

wireguard_exporter -p 9011 -i=wg1,wg2,wg3

Flag Descriptions Specs
-p exporter listning port No(defaults to 9011)
-i list of comma seperated interface names to monitor No(monitors all if not specifed)

Exported metrics

  • Latest Handshake
  • Bytes Received
  • Bytes Transmitted
Screenshot 2024-02-19 at 6 01 37 PM

Deployment

Currently, there are no binaries. To build from the source run the following command in the project repository. Just so you know, this build is not the static binary.

  make

Test

  make test

Run Locally

This small setup was created to simulate and show the exporter in action. I have created an environment with multiple containers communicating via wireguard VPN. The setup includes Prometheus and Grafana configured to showcase the metrics. To start setup clone the project and go to the project directory.

Make sure docker, docker-compose, and make utility are installed. Run the following command to create a setup

Run the project in a local setup

  make run

Monitor the metrics using Grafana Dashboard using the default password and username admin, admin

Import the dashboard from path setup/grafana-provisioning

http://localhost:3000/dashboards

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published