mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 10:39:53 +00:00
[wireguard_] Prevent never-connected peers to be shown as "(none)"
This commit is contained in:
parent
8184ce0871
commit
1e9a31c8f3
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ function wg_peers {
|
|||
# Subsequent lines are printed for each peer and contain in order separated
|
||||
# by tab: public-key, preshared-key, endpoint, allowed-ips, latest-handshake,
|
||||
# transfer-rx, transfer-tx, persistent-keepalive
|
||||
for line in $(wg show "$iface" dump | tr '\t' ';'); do
|
||||
for line in $(wg show "$iface" dump | grep -v none | tr '\t' ';'); do
|
||||
column_count=$(awk -F';' '{print NF}' <<< "$line")
|
||||
if [ "$column_count" -ne 8 ]; then
|
||||
# First line of dump contains interface info, ignore this line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue