summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a7796f)
raw | patch | inline | side by side (parent: 2a7796f)
author | Chris Lundquist <chris.lundquist@bluebox.net> | |
Wed, 27 Feb 2013 21:40:49 +0000 (13:40 -0800) | ||
committer | Chris Lundquist <chris.lundquist@bluebox.net> | |
Wed, 27 Feb 2013 21:40:49 +0000 (13:40 -0800) |
bindings/perl/lib/Collectd/Plugins/OpenVZ.pm | patch | blob | history |
diff --git a/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm b/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm
index 856f32066d23ec41cbdee113cb4b7f621743bf93..2e011b1f4f11524a8f1637d548be5779b6ff0c3b 100644 (file)
use strict;
use warnings;
-use Collectd qw( :all );
+#use Collectd qw( :all );
my $vzctl = '/usr/sbin/vzctl';
my $vzlist = '/usr/sbin/vzlist';
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);
($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] ];