ex_flux v0.1.0 ExFlux.LineProtocol View Source

Complete implementation of the InfluxDB line protocol

Create stats in the line protocol format from ExFlux.Points. The format is name,tag1=tval1,...,tagN=tvalN field1=val1,...,fieldN=valN timestamp where tags and timestamp are optional. There must be at least one field. If the timestamp is not specified, influx will use its own server’s time of receipt as the timestamp.

ExFlux.Point in its typespecs defines the line protocols type system. There are additional rules for escaping characters that may or may not be present in a key or value depending on whether it is a measurement name, a tag key or value, or a field key or value.

Performance and Setup Tips from the influx docs:

  1. Sort tags by key
  2. Use the coarsest precision possible (configured elsewhere)
  3. Use NTP to synchronize time between hosts (out of scope for this library)

Link to this section Summary

Functions

takes maps of well defined points and turns them into single line strings

Link to this section Functions

Link to this function encode(point) View Source
encode(point :: map() | ExFlux.Point.t()) :: String.t()

takes maps of well defined points and turns them into single line strings