Class GraphitePlaintextToRecordParser
java.lang.Object
com.arpnetworking.metrics.mad.parsers.GraphitePlaintextToRecordParser
- All Implemented Interfaces:
Parser<List<Record>,
ByteBuffer>
public final class GraphitePlaintextToRecordParser
extends Object
implements Parser<List<Record>,ByteBuffer>
Parses Graphite plaintext data as a
Record
.
https://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-plaintext-protocol
The source also allows you to add dimensions in three ways:
1) Specifying global tags programmatically.
2) Parsing tags from the metric name in Carbon format.
See: http://graphite.readthedocs.io/en/latest/tags.html
3) Parsing tags from the metric name in InfluxDb format.
See: https://github.com/influxdata/influxdb/issues/2996
(this is not yet available)
Sample MAD configuration:
{ type="com.arpnetworking.metrics.mad.sources.MappingSource" name="graphitetcp_mapping_source" actorName="graphite-tcp-source" findAndReplace={ "\\."=["/"] } source={ type="com.arpnetworking.metrics.common.sources.TcpLineSource" name="graphitetcp_source" host="0.0.0.0" port="2003" } }TODO(ville): Add pickle support. See: - https://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-pickle-protocol - https://github.com/irmen/Pyrolite
- Author:
- Ville Koskela (ville dot koskela at inscopemetrics dot io)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder
implementation forGraphitePlaintextToRecordParser
. -
Method Summary
-
Method Details
-
parse
Parses a graphite plaintext record.- Specified by:
parse
in interfaceParser<List<Record>,
ByteBuffer> - Parameters:
record
- a graphite plaintext record- Returns:
- A list of
DefaultRecord.Builder
- Throws:
ParsingException
- if the datagram is not parsable as graphite plaintext formatted message
-