A minimal, zero dependencies, thread-safe Ruby gem to send metrics via UDP to InfluxDB, and nothing else.
- Add infludp to your Gemfile:
gem 'infludp'
$metrics = Infludp::Client.new(
host: '127.0.0.1',
port: 4444
)
$metrics.send('cpu',
{
node: 'server1',
os: 'ubuntu'
},
{
value: 22
})
bundle exec rake test:all
Rehearsal ---------------------------------------------------------------
1000 metrics: 0.020000 0.000000 0.020000 ( 0.018585)
------------------------------------------------------ total: 0.020000sec
user system total real
1000 metrics: 0.020000 0.000000 0.020000 ( 0.019719)
- 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