summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f7f4cc1)
raw | patch | inline | side by side (parent: f7f4cc1)
author | Florian Forster <octo@collectd.org> | |
Mon, 6 Feb 2012 09:48:14 +0000 (10:48 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 6 Feb 2012 09:48:14 +0000 (10:48 +0100) |
Change-Id: I129127ff7216b8a23f9cb638df49192f5b16e45f
src/collectd.conf.pod | patch | blob | history | |
src/write_graphite.c | patch | blob | history |
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index 91a8493a8311a90e7fbd7241adea78bd0a6ed43d..be2e8027085279eed1c746587854a28228d013b1 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
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<write_graphite>
+
+The C<write_graphite> plugin writes data to I<Carbon>, the storage layer of
+I<Graphite>.
+
+Synopsis:
+
+ <Plugin write_graphite>
+ <Carbon>
+ Host "localhost"
+ Port "2003"
+ Prefix "collectd"
+ </Carbon>
+ </Plugin>
+
+=over 4
+
+=item B<Host> I<Address>
+
+Hostname or address to connect to. Defaults to C<localhost>.
+
+=item B<Port> I<Service>
+
+Service name or port number to connect to. Defaults to C<2003>.
+
+=item B<Prefix> I<String>
+
+When set, I<String> is added in front of the host name. Dots and whitespace are
+I<not> escaped in this string (see B<EscapeCharacter> below).
+
+=item B<Postfix> I<String>
+
+When set, I<String> is appended to the host name. Dots and whitespace are
+I<not> escaped in this string (see B<EscapeCharacter> below).
+
+=item B<EscapeCharacter> I<Char>
+
+I<Carbon> uses the dot (C<.>) as escape character and doesn't allow whitespace
+in the identifier. The B<EscapeCharacter> option determines which character
+dots, whitespace and control characters are replaced with. Defaults to
+underscore (C<_>).
+
+=back
+
=head2 Plugin C<write_http>
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 6b16bec215539245220fa662352604aad4ecef83..6c8a977f98770f0a6772c76c153faac667e55a2e 100644 (file)
--- a/src/write_graphite.c
+++ b/src/write_graphite.c
# 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
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);