mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Merge pull request #267 from Harvie/patch-1
Added openvz_ support for laverage and status
This commit is contained in:
commit
2a31f93e4a
@ -36,7 +36,12 @@ if [ "$1" = "config" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
vzlist -a -H -o hostname,$ATTRIBUTE | awk '{gsub(/\./,"_",$1)
|
||||
filter() { cat; }
|
||||
[ "$ATTRIBUTE" = 'laverage' ] && filter() { sed -e 's/[0-9\.]*\/\(.*\)\/.*$/\1/g'; }
|
||||
[ "$ATTRIBUTE" = 'status' ] && filter() { sed -e 's/running/10/g;s/stopped/0/g'; }
|
||||
#TODO: filter for uptime
|
||||
|
||||
vzlist -a -H -o hostname,$ATTRIBUTE | filter | awk '{gsub(/\./,"_",$1)
|
||||
print("'$ATTRIBUTE'"$1".value "$2)}'
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user