From 37f624d5e7612dcdecd52bb0e195862711396537 Mon Sep 17 00:00:00 2001 From: Chris Lundquist Date: Wed, 27 Feb 2013 13:40:49 -0800 Subject: [PATCH] [perl_openvz] fix update error --- bindings/perl/lib/Collectd/Plugins/OpenVZ.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm b/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm index 856f3206..2e011b1f 100644 --- a/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm +++ b/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm @@ -25,7 +25,7 @@ package Collectd::Plugins::OpenVZ; use strict; use warnings; -use Collectd qw( :all ); +#use Collectd qw( :all ); my $vzctl = '/usr/sbin/vzctl'; my $vzlist = '/usr/sbin/vzlist'; @@ -45,7 +45,7 @@ my @ignored_interfaces = ( "lo" ); sub interface_read($$) { my $veid = shift; my $name = shift; - my ($key, $current_interface, $val, @lines, @parts, @counters, $i); + my ($current_interface, $val, @lines, @parts, @counters, $i); my @if_instances = ('if_octets', 'if_packets', 'if_errors'); my %v = _build_report_hash($name); @@ -68,7 +68,7 @@ sub interface_read($$) { ($val = $parts[1]) =~ s/^\s*(.*?)\s*$/$1/; @counters = split(/ +/, $val); - $v{'plugin_instance'} = $key; + $v{'plugin_instance'} = $current_interface; for ($i= 0; $i <= $#if_instances; ++$i) { $v{'type'} = $if_instances[$i]; $v{'values'} = [ $counters[$i], $counters[$i + 8] ]; -- 2.11.0