Decode a line coming from graphite.
Graphite uses a simple scheme where each metric is given as a CRLF delimited line, whitespace split (space, tab) with three items:
- The metric name
- The metric value (optionally NaN)
- The timestamp
Decode-graphite-line will yield a simple event with just a service, metric, and timestamp.
(graphite-frame-decoder parser-fn protocol)
Creates a netty MessageToMessage for graphite lines. Takes a parser-fn: a function which will transform events generated by the parser, prior to insertion into streams. This can be used when graphite metrics have known patterns that you wish to extract more information (host, refined service name, tags) from; to fill in default states or TTLs, and so on.
If parser-fn is nil, defaults to identity.
(graphite-handler core stats ctx message)
Given a core, channel, and a message, applies the message to core.
Start a graphite-server. Options:
:host “127.0.0.1” :port 2003 :protocol :tcp or :udp (default :tcp) :parser-fn an optional function to further transform events after decoding.