From: Jarle Bjørgeengen Date: Mon, 25 Aug 2008 20:30:27 +0000 (+0200) Subject: Collectd::Unixsock: Allow passing of `Interval' to `PUTVAL'. X-Git-Tag: collectd-4.3.4~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=43e1aa5836da14b8fd473111ad48f7a69700ce7b;p=collectd.git Collectd::Unixsock: Allow passing of `Interval' to `PUTVAL'. --- diff --git a/bindings/perl/Collectd/Unixsock.pm b/bindings/perl/Collectd/Unixsock.pm index 8749c1ab..71a6d094 100644 --- a/bindings/perl/Collectd/Unixsock.pm +++ b/bindings/perl/Collectd/Unixsock.pm @@ -236,6 +236,12 @@ sub putval my $msg; my $identifier; my $values; + my $interval = ""; + + if (defined $args{'interval'}) + { + $interval = ' interval=' . $args{'interval'}; + } $identifier = _create_identifier (\%args) or return; if (!$args{'values'}) @@ -254,7 +260,7 @@ sub putval $values = join (':', $time, map { defined ($_) ? $_ : 'U' } (@{$args{'values'}})); } - $msg = "PUTVAL $identifier $values\n"; + $msg = "PUTVAL $identifier$interval $values\n"; #print "-> $msg"; send ($fh, $msg, 0) or confess ("send: $!"); $msg = undef;