Fflux is a dead simple and super fast InfluxDB UDP writer
Install the Gem
Add to your Gemfile
gem "fflux"
Configure
Fflux.setup do |config|
config.host = '127.0.0.1'
config.port = 8092
end
The values shown above are the defaults
There is a single class method write that does everything supported right now
# Write a simple measurement
Fflux.write("cpu", { value: 100 })
# Write multiple values
Fflux.write("memory", { free: 100, allocated: 800 })
# Measurements with tags
Fflux.write("event", { message: "Something happened" }, { environment: "test" })
Do note that this implements the post 0.9.3 Line Protocol so integers are followed by i
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request