mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
[openvz_] Fix failure to monitor bean counters for servers with long names.
This commit is based on https://github.com/munin-monitoring/contrib/pull/540, excluding the problematic change of the datasource names.
This commit is contained in:
parent
810caf8840
commit
b2a5b603e1
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo "graph_vlabel $ATTRIBUTE Value"
|
echo "graph_vlabel $ATTRIBUTE Value"
|
||||||
echo "graph_category openvz"
|
echo "graph_category openvz"
|
||||||
echo "graph_info This graph shows OpenVZ: $ATTRIBUTE"
|
echo "graph_info This graph shows OpenVZ: $ATTRIBUTE"
|
||||||
vzlist -a -H -o hostname | awk '{gsub(/\./,"_",$1)
|
vzlist -a -H --no-trim -o hostname | awk '{gsub(/\./,"_",$1)
|
||||||
print("'$ATTRIBUTE'"$1".label "$1"\n" \
|
print("'$ATTRIBUTE'"$1".label "$1"\n" \
|
||||||
"'$ATTRIBUTE'"$1".info '$ATTRIBUTE' for VE"$1)}'
|
"'$ATTRIBUTE'"$1".info '$ATTRIBUTE' for VE"$1)}'
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -41,7 +41,7 @@ filter() { cat; }
|
||||||
[ "$ATTRIBUTE" = 'status' ] && filter() { sed -e 's/running/10/g;s/stopped/0/g'; }
|
[ "$ATTRIBUTE" = 'status' ] && filter() { sed -e 's/running/10/g;s/stopped/0/g'; }
|
||||||
#TODO: filter for uptime
|
#TODO: filter for uptime
|
||||||
|
|
||||||
vzlist -a -H -o hostname,$ATTRIBUTE | filter | awk '{gsub(/\./,"_",$1)
|
vzlist -a -H --no-trim -o hostname,$ATTRIBUTE | filter | awk '{gsub(/\./,"_",$1)
|
||||||
print("'$ATTRIBUTE'"$1".value "$2)}'
|
print("'$ATTRIBUTE'"$1".value "$2)}'
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue