Collectd-Plugins-Riemann
view release on metacpan or search on metacpan
lib/Collectd/Plugins/Riemann/Query.pm view on Meta::CPAN
package Collectd::Plugins::Riemann::Query;
use strict;
use warnings;
use Collectd qw( :all );
use Collectd::Plugins::Common qw(recurse_config);
use Riemann::Client;
use Try::Tiny;
#use DDP {
# deparse => 1,
# class => {
# expand => 'all'
# }
#};
my %opt = (
Server => "127.0.0.1",
Port => 5555,
Protocol => 'TCP',
Type => 'gauge',
PluginInstance => '',
TypeInstance => '',
PluginFrom => 'plugin',
PluginInstanceFrom => 'plugin_instance',
TypeFrom => 'ds_type',
TypeInstanceFrom => 'type_instance',
);
=head1 NAME
Collectd::Plugins::Riemann::Query - Collectd plugin for querying Riemann Events
=head1 SYNOPSIS
To be used with L<Collectd>.
=over 8
=item From the collectd configfile
<LoadPlugin "perl">
Globals true
</LoadPlugin>
<Plugin "perl">
BaseName "Collectd::Plugins"
LoadPlugin "Riemann::Query"
<Plugin "Riemann::Query">
Host myriemann
Port 5555
Protocol TCP
# Static plugin metadata
<Plugin foo>
Query "tagged \"foo\" and service =~ \"bar%\""
Plugin foo
PluginInstance bar
Type gauge
</Plugin>
# plugin metadata from riemann attributes
<Plugin>
Query "tagged \"aggregation\""
PluginFrom plugin
PluginInstanceFrom plugin_instance
TypeFrom ds_type
TypeInstanceFrom type_instance
</Plugin>
</Plugin>
</Plugin>
( run in 0.472 second using v1.01-cache-2.11-cpan-39bf76dae61 )