You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've installed prometheus_wireguard_exporter via cargo (version 3.6.6) on ubuntu 22.04 and added friendly_name and friendly_json to the wireguard configs but they are not showing up in the metrics properly. Only one peer shows up.
Expected outcome
The friendly_name and friendly_json key value pairs should show up in the metrics for all peers where they are defined.
# prometheus_wireguard_exporter -n /etc/wireguard/wg0.conf
[2023-04-04T19:08:45Z INFO prometheus_wireguard_exporter] prometheus_wireguard_exporter v3.6.6 starting...
[2023-04-04T19:08:45Z INFO prometheus_wireguard_exporter] using options: Options { verbose: false, prepend_sudo: false, separate_allowed_ips: false, extract_names_config_files: Some(["/etc/wireguard/wg0.conf"]), interfaces: None, export_remote_ip_and_port: false, export_latest_handshake_delay: false }
[2023-04-04T19:08:45Z INFO prometheus_wireguard_exporter] starting exporter on http://0.0.0.0:9586/metrics
[2023-04-04T19:08:45Z INFO prometheus_exporter_base] Listening on http://0.0.0.0:9586/metrics
Metrics Output
# HELP wireguard_sent_bytes_total Bytes sent to the peer
# TYPE wireguard_sent_bytes_total counter
wireguard_sent_bytes_total{interface="wg0",public_key="7LetcwPem8vGgLCx71lQkeivvm9FVPtkeVAc3BTEvXg=",allowed_ips="10.254.254.2/32"} 1476
wireguard_sent_bytes_total{interface="wg0",public_key="7jpY/7C+A/rYMEzHi1qNqmUSJKZK+gp68WUNThqY+FQ=",allowed_ips="10.254.254.3/32",peer_name="vm03"} 1604
wireguard_sent_bytes_total{interface="wg0",public_key="qz27h6YxDV7IpGFvEK77QjCr6e06iQvaFqFdZsOQZ3o=",allowed_ips="10.254.254.4/32"} 1956
# HELP wireguard_received_bytes_total Bytes received from the peer
# TYPE wireguard_received_bytes_total counter
wireguard_received_bytes_total{interface="wg0",public_key="7LetcwPem8vGgLCx71lQkeivvm9FVPtkeVAc3BTEvXg=",allowed_ips="10.254.254.2/32"} 1068
wireguard_received_bytes_total{interface="wg0",public_key="7jpY/7C+A/rYMEzHi1qNqmUSJKZK+gp68WUNThqY+FQ=",allowed_ips="10.254.254.3/32",peer_name="vm03"} 1164
wireguard_received_bytes_total{interface="wg0",public_key="qz27h6YxDV7IpGFvEK77QjCr6e06iQvaFqFdZsOQZ3o=",allowed_ips="10.254.254.4/32"} 972
# HELP wireguard_latest_handshake_seconds UNIX timestamp seconds of the last handshake
# TYPE wireguard_latest_handshake_seconds gauge
wireguard_latest_handshake_seconds{interface="wg0",public_key="7LetcwPem8vGgLCx71lQkeivvm9FVPtkeVAc3BTEvXg=",allowed_ips="10.254.254.2/32"} 1680643129
wireguard_latest_handshake_seconds{interface="wg0",public_key="7jpY/7C+A/rYMEzHi1qNqmUSJKZK+gp68WUNThqY+FQ=",allowed_ips="10.254.254.3/32",peer_name="vm03"} 1680643062
wireguard_latest_handshake_seconds{interface="wg0",public_key="qz27h6YxDV7IpGFvEK77QjCr6e06iQvaFqFdZsOQZ3o=",allowed_ips="10.254.254.4/32"} 1680643133
Troubleshooting
I've tried:
I've used both friendly_name and friendly_json interchangeably and it does dynamically change on the working peer but has no affect on the other peers.
I've tried changing the order of the peers in the config with no change in outcome.
I've tried this in ubuntu 22.04 and NONE of the peers friendly_name appeared.
I've run the exporter in debug mode and see no errors or warnings
I've purposely used bad syntax in the friendly_json and found that if I do that on the working peer I get a warning in the exporter log
Summary
I've installed
prometheus_wireguard_exporter
via cargo (version 3.6.6) on ubuntu 22.04 and addedfriendly_name
andfriendly_json
to the wireguard configs but they are not showing up in the metrics properly. Only one peer shows up.Expected outcome
The
friendly_name
andfriendly_json
key value pairs should show up in the metrics for all peers where they are defined.Exporter Version
Wireguard Peer Config
Exporter Startup
Metrics Output
Troubleshooting
I've tried:
friendly_name
andfriendly_json
interchangeably and it does dynamically change on the working peer but has no affect on the other peers.FYI, there is a typo in the above warning line. I believe it should be "Description" vs "Descrition"
The text was updated successfully, but these errors were encountered: