From: Florian Forster Date: Wed, 9 Dec 2009 07:53:24 +0000 (+0100) Subject: monitorus plugin: Updated for the new API. X-Git-Tag: collectd-4.9.0~16 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fb8df383f19a3c6c277c68badd382660b8fbd340;p=collectd.git monitorus plugin: Updated for the new API. `type' is now part of the value list. --- diff --git a/bindings/perl/lib/Collectd/Plugins/Monitorus.pm b/bindings/perl/lib/Collectd/Plugins/Monitorus.pm index 1f6c9dac..0fee138a 100644 --- a/bindings/perl/lib/Collectd/Plugins/Monitorus.pm +++ b/bindings/perl/lib/Collectd/Plugins/Monitorus.pm @@ -39,12 +39,12 @@ plugin_register (TYPE_READ, "monitorus", "monitorus_read"); sub monitorus_read { - my $vl = { plugin => 'monitorus' }; + my $vl = { plugin => 'monitorus', type => 'gauge' }; # Only retrieve a value occasionally in order to not overload mon.itor.us if (++$intervalcnt{'values'} = [ $prev_value ]; - plugin_dispatch_values ('gauge', $vl); + plugin_dispatch_values ($vl); return 1; } @@ -96,7 +96,7 @@ sub monitorus_read $prev_value = $value; $vl->{'values'} = [ $value ]; - plugin_dispatch_values ('gauge', $vl); + plugin_dispatch_values ($vl); return 1; }