Plugin:Write Graphite

From collectd Wiki
Revision as of 21:20, 1 September 2014 by Mfournier (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Write Graphite plugin
Type: write
Callbacks: config, flush, write
Status: supported
First version: 5.1
Copyright: 2012 Pierre-Yves Ritschard
2011 Scott Sanders
2009 Paul Sadauskas
2009 Doug MacEachern
2007–2012 Florian Forster
License: GPLv2
Manpage: collectd.conf(5)
List of Plugins

The Write Graphite plugin stores values in Carbon, the storage layer of Graphite.

The plugin aims to be very efficient. It keeps the TCP connection to Carbon open in order to minimize the connection handshake overhead. It buffers the data in a buffer to send many lines at once, rather than generating lots of small network packets. The size of this buffer (1428 bytes) is dimensioned so that the buffer as well as the TCP and IP header fit into one Ethernet frame and can (hopefully) be delivered without fragmentation.

Contents

Synopsis

LoadPlugin "write_graphite"
<Plugin "write_graphite">
 <Node "example">
   Host "localhost"
   Port "2003"
   #Prefix "collectd."
   #Postfix ""
   #Protocol "udp"
   #LogSendErrors false
   EscapeCharacter "_"
   SeparateInstances true
   StoreRates false
   AlwaysAppendDS false
 </Node>
</Plugin>

This will register a writer under this string:

write_graphite/example

Example data

Data is sent as one metric per line, where each data source is on its own line. Each line consists of three fields: a name, the actual value, and the timestamp in epoch. The following data was generated with StoreRates set to true:

myhost_example_com.cpu-2.cpu-idle 98.6103 1329168255
myhost_example_com.cpu-2.cpu-nice 0 1329168255
myhost_example_com.cpu-2.cpu-user 0.800076 1329168255
myhost_example_com.cpu-2.cpu-wait 0.400054 1329168255
myhost_example_com.cpu-2.cpu-system 0.20002 1329168255
myhost_example_com.cpu-2.cpu-softirq 0 1329168255
myhost_example_com.cpu-2.cpu-interrupt 0 1329168255

Dependencies

  • None

See also


Personal tools
Namespaces

Variants
Actions
Navigation
Tools