Add support for prometheus_wireguard_exporter

https://github.com/MindFlavor/prometheus_wireguard_exporter
This commit is contained in:
Yohanes Nugroho 2023-03-07 17:54:39 +07:00
parent aadf099f50
commit 1c73f6cfd4

View file

@ -1,6 +1,10 @@
# This file was generated using wireguard-ui (https://github.com/ngoduykhanh/wireguard-ui)
# Please don't modify it manually, otherwise your change might get replaced.
# friendly_name is used by prometehus_wireguard_exporter to identify a peer.
# More information can be found here:
# https://github.com/MindFlavor/prometheus_wireguard_exporter#friendly-tags
# Address updated at: {{ .serverConfig.Interface.UpdatedAt }}
# Private Key updated at: {{ .serverConfig.KeyPair.UpdatedAt }}
[Interface]
@ -18,6 +22,7 @@ PostDown = {{ .serverConfig.Interface.PostDown }}
# Created at: {{ .Client.CreatedAt }}
# Update at: {{ .Client.UpdatedAt }}
[Peer]
# friendly_name = {{ .Client.Name }}
PublicKey = {{ .Client.PublicKey }}
{{if .Client.PresharedKey }}PresharedKey = {{ .Client.PresharedKey }}
{{end}}AllowedIPs = {{$first :=true}}{{range .Client.AllocatedIPs }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}{{range .Client.ExtraAllowedIPs }},{{.}}{{end}}