collectd.conf(5): Add stub for the write_graphite plugin.

Change-Id: I129127ff7216b8a23f9cb638df49192f5b16e45f

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Use cf_util_get_service() for the "Port" option.

Change-Id: If3f0b32f86a40dbaa22837dc15f51429239af03a

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Implement the StoreRates option.

Most of it was already present in the code anyway, so I just added the
appropriate config handling.

Change-Id: I7ce8be2f5b075da690872ec72b3610eae05b3c6c

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Fix trailing underscores.

This may also fix an off-by-one error when the name is long enough. D'oh!

Change-Id: Ibc5a68f9bc93eed6366d074b55a7aca020bcf990

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Implement the "AlwaysAppendDS" option.

Don't append DS name by default, except when there is more than one DS.
The "AlwaysAppendDS" option can be used to force the plugin to always
append the DS.

Change-Id: I0221bef49375e3b5c5de99bb8f5a9cd641b696c3

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Decrese buffer size.

The larger the buffer, the longer you need to wait for the data to be written
to Carbon. The new buffer size assumes an MTU of 1500 bytes (Ethernet payload)
and keeps margins for IPv6 and TCP (with timestamps). This should decrease the
number of packets needed (because data is now cleanly aligned to the packet
size) and decrease the overall time spent buffered.

Change-Id: I73021608f1ff0f22f9e73cd62b7fb5ea79421546

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Use swrite() instead of write().

swrite() ensures that the entire buffer is written before the buffer is reset.

Change-Id: I105d42d8ea5b71acd5a5e37b7cc4209045f28d47

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Use CR-LF line endings.

Using this line ending in ASCII conversations over the network has been a
convention since the 1970s, let's stick with it.

Change-Id: I5d0640e520a70483ab9256989f89e9e2dcab7643

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Print the time as an unsigned int.

Change-Id: I61f4952c8debdf7c80c4e1e4647cf42ecf00f033

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Report configuration errors for the EscapeCharacter option.

Change-Id: Ia99e2c8d9c7ced344bb52f4d80957fa9abe3e7db

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Simplify wg_write_messages().

There is no need for special handling of values with one / more data sources.

Change-Id: I849d4a881ed50ad1c7b8cf5c0abd1c5d62fe5258

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Set a (hopefully unique) callback name.

Change-Id: Iab70d4f40a614bc04b70b61868d30721ee9641c1

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Add the "SeparateInstances" option.

Change-Id: I8670b62ed323698c7764d3039ccd8af052bd1b6f

Signed-off-by: Scott Sanders <scott@jssjr.com>
write_graphite plugin: Enable "StoreRates" by default.

Change-Id: I814c45d035ce42de07815fecfe0b667080e2d900

Signed-off-by: Scott Sanders <scott@jssjr.com>
Tell the world to use the native plugin