From: Florian Forster Date: Mon, 6 Feb 2012 09:48:14 +0000 (+0100) Subject: collectd.conf(5): Add stub for the write_graphite plugin. X-Git-Tag: collectd-5.1.0~33^2~14 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7353a23cf525e3e820e32076c89eae8bbb2d3a3d;p=collectd.git collectd.conf(5): Add stub for the write_graphite plugin. Change-Id: I129127ff7216b8a23f9cb638df49192f5b16e45f --- diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 91a8493a..be2e8027 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -4756,6 +4756,50 @@ traffic (e.Eg. due to headers and retransmission). If you want to collect on-wire traffic you could, for example, use the logging facilities of iptables to feed data for the guest IPs into the iptables plugin. +=head2 Plugin C + +The C plugin writes data to I, the storage layer of +I. + +Synopsis: + + + + Host "localhost" + Port "2003" + Prefix "collectd" + + + +=over 4 + +=item B I
+ +Hostname or address to connect to. Defaults to C. + +=item B I + +Service name or port number to connect to. Defaults to C<2003>. + +=item B I + +When set, I is added in front of the host name. Dots and whitespace are +I escaped in this string (see B below). + +=item B I + +When set, I is appended to the host name. Dots and whitespace are +I escaped in this string (see B below). + +=item B I + +I uses the dot (C<.>) as escape character and doesn't allow whitespace +in the identifier. The B option determines which character +dots, whitespace and control characters are replaced with. Defaults to +underscore (C<_>). + +=back + =head2 Plugin C This output plugin submits values to an http server by POST them using the diff --git a/src/write_graphite.c b/src/write_graphite.c index 6b16bec2..6c8a977f 100644 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@ -71,6 +71,10 @@ # define WG_DEFAULT_SERVICE "2003" #endif +#ifndef WG_DEFAULT_ESCAPE +# define WG_DEFAULT_ESCAPE '_' +#endif + #ifndef WG_SEND_BUF_SIZE # define WG_SEND_BUF_SIZE 4096 #endif @@ -636,7 +640,7 @@ static int wg_config_carbon (oconfig_item_t *ci) cb->service = NULL; cb->prefix = NULL; cb->postfix = NULL; - cb->escape_char = '_'; + cb->escape_char = WG_DEFAULT_ESCAPE; pthread_mutex_init (&cb->send_lock, /* attr = */ NULL);