mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Plugin lxc: simplify interface of "lxc_netdev"
This commit is contained in:
parent
89003f0188
commit
313d195f3b
1 changed files with 2 additions and 4 deletions
|
@ -132,8 +132,6 @@ function lxc_netdev {
|
||||||
(egrep '^lxc.net.0.veth.pair' "$lxcpath/$g/config" 2>/dev/null \
|
(egrep '^lxc.net.0.veth.pair' "$lxcpath/$g/config" 2>/dev/null \
|
||||||
|| egrep '^lxc.network.veth.pair' "$lxcpath/$g/config"
|
|| egrep '^lxc.network.veth.pair' "$lxcpath/$g/config"
|
||||||
) | awk '{print $NF;}'
|
) | awk '{print $NF;}'
|
||||||
else
|
|
||||||
echo unknown
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,7 +264,7 @@ EOF
|
||||||
for n in $active_guests
|
for n in $active_guests
|
||||||
do
|
do
|
||||||
device=$(lxc_netdev "$n")
|
device=$(lxc_netdev "$n")
|
||||||
if [ "$device" = "unknown" ]; then
|
if [ -z "$device" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
bps="U"
|
bps="U"
|
||||||
|
@ -366,7 +364,7 @@ echo "multigraph lxc_net"
|
||||||
for n in $active_guests
|
for n in $active_guests
|
||||||
do
|
do
|
||||||
device=$(lxc_netdev "$n")
|
device=$(lxc_netdev "$n")
|
||||||
if [ "$device" = "unknown" ]; then
|
if [ -z "$device" ]; then
|
||||||
value_up="U"
|
value_up="U"
|
||||||
value_down="U"
|
value_down="U"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue