diff --git a/plugins/other/openvz-load-avg b/plugins/other/openvz-load-avg index 4c0219f9..42c6deb8 100755 --- a/plugins/other/openvz-load-avg +++ b/plugins/other/openvz-load-avg @@ -52,10 +52,10 @@ if ( $arg eq "autoconf" ) { print "yes\n"; } elsif ( $arg eq "config" ) { print "multigraph openvz_loadavg\n"; - print "graph_title loadavg of VE\n"; + print "graph_title load average of VE\n"; print "graph_args --base 1000 -l 0 -N\n"; print "graph_scale no\n"; - print "graph_vlabel loadavg\n"; + print "graph_vlabel load average\n"; print "graph_info Shows 5-minute load average per VE\n"; print "graph_category OpenVZ\n"; @@ -68,7 +68,7 @@ if ( $arg eq "autoconf" ) { my $name = $label; $name =~ s/\W/_/g; - print "$name.label $label: load average\n"; + print "$name.label $label\n"; print "$name.min 0\n"; if ($A==0) { print "$name.draw AREA\n"; @@ -78,48 +78,17 @@ 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`; my $A=0; - print "multigraph openvz_loadavg\n"; - print "graph_title loadavg of VE\n"; - print "graph_vlabel loadavg\n"; - print "graph_category OpenVZ\n"; for (@result ) { 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" } } - for (@result ) { - if (( my $veid,my $label, my $laverage ) = /^\s*(\d+)\s+([\w\-]+)\s+[\d\.]+\/([\d\.]+)\/[\d\.]+\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.value $laverage\n" - } - } - }