mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Another duplicate block in config case and only value line kept for "normal" case
This commit is contained in:
parent
d305c5bfee
commit
5696c338c3
@ -78,19 +78,6 @@ if ( $arg eq "autoconf" ) {
|
||||
}
|
||||
}
|
||||
|
||||
for (@result ) {
|
||||
( my $veid,my $label ) = /^\s*(\d+)\s*([\w\-]+)\s*$/ ;
|
||||
my $name = $label;
|
||||
$name =~ s/\W/_/g;
|
||||
|
||||
print "multigraph openvz_loadavg.$name\n";
|
||||
print "graph_title loadavg of VE\n";
|
||||
print "graph_vlabel loadavg\n";
|
||||
print "$name.label $label: load average\n";
|
||||
print "$name.info Average load on $label for the past 5 minutes\n";
|
||||
print "$name.min 0\n";
|
||||
print "$name.draw AREA\n";
|
||||
}
|
||||
} else {
|
||||
# Getting the values
|
||||
my @result=`/usr/sbin/vzlist -H -s veid -o veid,name,laverage`;
|
||||
@ -100,9 +87,6 @@ if ( $arg eq "autoconf" ) {
|
||||
if (( my $veid,my $label, my $laverage ) = /^\s*(\d+)\s+([\w\-]+)\s+[\d\.]+\/([\d\.]+)\/[\d\.]+\s*$/) {
|
||||
my $name = $label;
|
||||
$name =~ s/\W/_/g;
|
||||
print "$name.label $name\n";
|
||||
print "$name.min 0\n";
|
||||
if ($A==0) { print "$name.draw AREA\n"; $A=1; } else { print "$name.draw STACK\n"; }
|
||||
print "$name.value $laverage\n"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user