Low commit activity in last 3 years
No release in over a year
A metrics line parser gem for things like influxdb line protocol
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Telemetry::Metrics::Parser

A ruby gem designed to parse and process telemetry style metrics

InfluxDB Line Protocol

# weather,location=us-midwest temperature=82 1465839830100400200
#   |    -------------------- --------------  |
#   |             |             |             |
#   |             |             |             |
# +-----------+--------+-+---------+-+---------+
# |measurement|,tag_set| |field_set| |timestamp|
# +-----------+--------+-+---------+-+---------+

Example

require 'telemetry/metrics/parser'
results = Telemetry::Metrics::Parser.line_protocol('weather,location=us-midwest temperature=82 1465839830100400200')

results[:measurement] # => weather
results[:tags] # => { location: 'us-midwest' }
results[:fields] # => { temperature: 82 }
results[:timestamp] # => 1465839830100400200

Validations

Telemetry::Metrics::Parser::LineProtocol.line_is_valid?('weather,location=us-midwest temperature=82 1465839830100400200') # true
Telemetry::Metrics::Parser::LineProtocol.line_is_valid?('weather,location=us-midwest temperature=this_field_is_a_string 1465839830100400200') # false but returned as a string error

Authors