Copyright (c) 2014 Basho Technologies, Inc. All Rights Reserved.
Version: Feb 1 2015 23:02:37
Authors: Ulf Wiger (ulf.wiger@feuerlabs.com
), Magnus Feuer (magnus.feuer@feuerlabs.com
).
The graphite reporter uses the TCP/IP protocol to forward
subscribed-to metrics and data points to a graphite server, such as
the one provided by http://hostedgraphite.com
. When the graphite
reporter receives a metric-datapoint value (subscribed to through
exometer_report:subscriber()
), the reporter will immediately
forward the key-value pair to the graphite server.
Below is an example of a graphite reporter application environment, with its correct location in the hierarchy:
{exometer_core, [
{report, [
{reporters, [
{exometer_report_graphite, [
{connect_timeout, 5000},
{prefix, "web_stats"},
{env_prefix, "HOSTNAME"},
{host, "carbon.hostedgraphite.com"},
{port, 2003},
{api_key, "267d121c-8387-459a-9326-000000000000"}
]}
]}
]}
]}
The following attributes are available for configuration:
connect_timeout
(milliseconds - default: 5000)
Specifies how long the graphite reporter plugin shall wait for a TCP
connection to complete before timing out. A timed out connection will
not be reconnected automatically. (To be fixed.)
prefix
(string - default: "")
Specifies an optional prefix to prepend all metric names with before
they are sent to the graphite server.
env_prefix
(string - default: "")
Specifies an environmental variable name from which an additional prefix
will be taken. When not set no addional prefix is added.
In case both prefix
and env_prefix
are defined it will be placed before prefix
and separated with a dot.
host
(string - default: "carbon.hostedgraphite.com")
Specifies the name (or IP address) of the graphite server to report to.
port
(integer - default: 2003)
Specifies the TCP port on the given graphite server to connect to.
api_key
(string - default: n/a)
Specifies the api key to use when reporting to a hosted graphite server.
Full metric naming depending on the configuration is as following:
api_key |
env_prefix |
prefix |
Full metric name |
---|---|---|---|
✗ | ✗ | ✗ | Metric |
✗ | ✗ | ✓ | Prefix.Metric |
✗ | ✓ | ✗ | EnvPrefix.Metric |
✗ | ✓ | ✓ | EnvPrefix.Prefix.Metric |
✓ | ✗ | ✗ | ApiKey.Metric |
✓ | ✗ | ✓ | ApiKey.Prefix.Metric |
✓ | ✓ | ✗ | ApiKey.EnvPrefix.Metric |
✓ | ✓ | ✓ | ApiKey.EnvPrefix.Prefix.Metric |