Difference between revisions of "Plugin:Write Riemann"
(→Example data: Update example data to match current implementation.) |
(→Synopsis: add how we name ourselves.) |
||
Line 39: | Line 39: | ||
Tag "foobar" | Tag "foobar" | ||
</Plugin> | </Plugin> | ||
+ | |||
+ | This will register a writer with the name | ||
+ | write_riemann/localhost | ||
== Example data == | == Example data == |
Revision as of 14:27, 18 June 2014
Write Riemann plugin | |
---|---|
Type: | write |
Callbacks: | config, notification, write |
Status: | supported |
First version: | 5.3 |
Copyright: | 2012,2013 Pierre-Yves Ritschard 2013 Florian Forster |
License: | MIT license |
Manpage: | collectd.conf(5) |
List of Plugins |
The Write Riemann plugin stores values in Riemann, a stream processing and monitoring system.
Riemann is a stream processing system that can be used for querying, manipulating and visualizing value streams. This makes Riemann a powerful and useful companion for collectd because it allows more sophisticated alerting than is possible with collectd's built-in thresholds.
The Write Riemann plugin uses UDP packets or a TCP connection to send data to Riemann. The data is binary encoded using Protocol Buffers (protobuf), see section #Example data below.
You can configure multiple Node
blocks to send data to multiple instances of Riemann. You can use the name specified in the block to send data selectively, using filters. For example, if you configure the connection to an instance of Riemann with
<Node "foobar"> # ... </Node>
you can write to this instance only using the block syntax of the Write target:
<Target "write"> Plugin "write_riemann/foobar" </Target>
Synopsis
<Plugin "write_riemann"> <Node "example"> Host "localhost" Port "5555" Protocol UDP StoreRates true AlwaysAppendDS false </Node> Tag "foobar" </Plugin>
This will register a writer with the name
write_riemann/localhost
Example data
Data is sent as Msg
objects, encoded in a protobuf. You can find the definition of the message types in src/riemann.proto.
events { time: 1358875608 service: "cpu-0/cpu-idle" host: "server.example.com" attribute { key: "plugin" value: "cpu" } attribute { key: "plugin_instance" value: "0" } attribute { key: "type" value: "cpu" } attribute { key: "type_instance" value: "idle" } attribute { key: "ds_type" value: "derive:rate" } attribute { key: "ds_name" value: "value" } attribute { key: "ds_index" value: "0" } ttl: 20 metric_d: 66.600990955859146 }
Dependencies
- The
<google/protobuf-c/protobuf-c.h>
header file.
Caveats
Precision
Currently, Riemann provides a precision of one second. We recommend to use at least a two-second interval when sending data to Riemann, to avoid "duplicate" metrics when the time is rounded to the nearest second.
See also