MindFlavor / prometheus_wireguard_exporter

A Prometheus exporter for WireGuard, written in Rust.
https://mindflavor.github.io/prometheus_wireguard_exporter
MIT License
463 stars 49 forks source link

wireguard_latest_handshake_seconds metric confusing #124

Open pavlozt opened 2 months ago

pavlozt commented 2 months ago

wireguard_latest_handshake_seconds metric confusing The metric does not match the description. This is even reflected in the readme:

wireguard_latest_handshake_seconds{interface="wg0",public_key="2S7mA0vEMethCNQrJpJKE81/JmhgtB+tHHLYQhgM6kk=",allowed_ips="10.70.0.2/32,10.70.0.66/32",friendly_name="OnePlus 6T"} 1562834127
1562834127

This value 1562834127 is very similar to time "Thu Jul 11 2019 08:35:27 GMT+0000"

If this is seconds, then it will export with the prefix _timestamp_seconds according to naming guide https://prometheus.io/docs/practices/naming/

But most likely we need to calculate this metric differently.