Infludp.
A minimal, zero dependencies, thread-safe Ruby gem to send metrics via UDP to InfluxDB, and nothing else.
Installation.
- Add infludp to your Gemfile:
ruby gem 'infludp'
Usage.
$metrics = Infludp::Client.new(
host: '127.0.0.1',
port: 4444
)
$metrics.send('cpu', {
node: 'server1',
value: 22,
boot: true
})
Test.
bundle exec rake test:all
Benchmarks.
Rehearsal ---------------------------------------------------------------
1000 metrics: 0.030000 0.020000 0.050000 ( 0.046954)
------------------------------------------------------ total: 0.050000sec
user system total real
1000 metrics: 0.030000 0.010000 0.040000 ( 0.045463)
Contributing.
- Fork it ( https://github.com/badshark/infludp/fork )
- 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