mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +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.network.veth.pair' "$lxcpath/$g/config"
|
||||
) | awk '{print $NF;}'
|
||||
else
|
||||
echo unknown
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -266,7 +264,7 @@ EOF
|
|||
for n in $active_guests
|
||||
do
|
||||
device=$(lxc_netdev "$n")
|
||||
if [ "$device" = "unknown" ]; then
|
||||
if [ -z "$device" ]; then
|
||||
continue
|
||||
fi
|
||||
bps="U"
|
||||
|
@ -366,7 +364,7 @@ echo "multigraph lxc_net"
|
|||
for n in $active_guests
|
||||
do
|
||||
device=$(lxc_netdev "$n")
|
||||
if [ "$device" = "unknown" ]; then
|
||||
if [ -z "$device" ]; then
|
||||
value_up="U"
|
||||
value_down="U"
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue