Skip to content

robertlabrie/influxparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

influxparser

This gem parses InfluxDB line protocol into a usable Ruby hash map. It exists primarily to support logstash-filter-influxdb but is a separate gem for anyone who needs it.

Pull reqeusts are welcome. The tests are based on the influx docs but there are plenty more tests that need to be written.

The official influxdb ruby gem supports encoding so I didn't bother.

usage

InfluxParser.parse_point('weather,location=us-midwest temperature="too warm" 1465839830100400200')

options

The second parameter for parse_point is a hash array of options. The current options are

  • :parse_types: Parse data types to ruby types (float, int, bool). If false all values in the fields are treated as strings.

    • default: false
  • :time_format: Parses the timestamp attribute (if present) and formats it accoring to a strftime format. InfluxDB time is always UTC so is this.

    • default: nil

About

Influx line parser in ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages