#2705·wg-easy

[Feat]: Is it possible to collect client connection IP and PORT (endpoints) in /metrics/prometheus?

Author: babyshenCreated Jul 21, 2026Updated Jul 21, 2026

Description

Is it possible to collect client connection IP and PORT (endpoints) in /metrics/prometheus?

remote_ip and remote_port

wg show  all  endpoints 

Suggested Solution

The /metrics/prometheus directory collects client connection IP and PORT (endpoints).

wireguard_sent_bytes{interface="wg0",enabled="true",ipv4Address="192.168.0.2",ipv6Address="fdcc:ad94:bacf:61a4::cafe:3",name="tests", remote_ip="11.12.13.14", remote_port="133"} 1796

wireguard_received_bytes{interface="wg0",enabled="true",ipv4Address="192.168.0.2",ipv6Address="fdcc:ad94:bacf:61a4::cafe:3",name="tests",remote_ip="11.12.13.14", remote_port="133"} 72396

wireguard_latest_handshake_seconds{interface="wg0",enabled="true",ipv4Address="192.168.0.2",ipv6Address="fdcc:ad94:bacf:61a4::cafe:3",name="tests",remote_ip="11.12.13.14", remote_port="133"} 14829.626

Alternatives

No response

Additional Context

No response