Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josacar/sumologic-metrics
Sumologic metrics worker in ruby
https://github.com/josacar/sumologic-metrics
carbon graphite metrics ruby sumologic
Last synced: 15 days ago
JSON representation
Sumologic metrics worker in ruby
- Host: GitHub
- URL: https://github.com/josacar/sumologic-metrics
- Owner: josacar
- License: mit
- Created: 2018-05-19T14:31:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-24T17:07:06.000Z (over 4 years ago)
- Last Synced: 2024-04-26T08:20:33.233Z (7 months ago)
- Topics: carbon, graphite, metrics, ruby, sumologic
- Language: Ruby
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Sumologic::Metrics
[![Build Status](https://www.travis-ci.org/josacar/sumologic-metrics.svg?branch=master)](https://www.travis-ci.org/josacar/sumologic-metrics)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjosacar%2Fsumologic-metrics.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjosacar%2Fsumologic-metrics?ref=badge_shield)
[![Gem Version](https://badge.fury.io/rb/sumologic-metrics.svg)](https://badge.fury.io/rb/sumologic-metrics)Upload metrics to Sumologic!
## Requirements
- At least MRI 2.5 or JRuby 9.2.0.0
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'sumologic-metrics'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install sumologic-metrics
## Usage
```ruby
require 'sumologic-metrics'url = ENV.fetch('SUMOLOGIC_ENDPOINT')
metrics = Sumologic::Metrics.new(collector_uri: url)
metrics.push('cluster=prod node=lb-1 metric=cpu ip=2.2.3.4 team=infra 99.12 1528020619')
```### #push
Queues the metric to the worker ( asynchronous )
### #queued_metrics
Returns the size of the queued items
### #flush
Waits synchronously until the queue is empty
## Documentation
- [Carbon 2.0](https://help.sumologic.com/Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Data-to-an-HTTP-Source) formatted metrics
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/josacar/sumologic-metrics. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjosacar%2Fsumologic-metrics.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjosacar%2Fsumologic-metrics?ref=badge_large)
## Code of Conduct
Everyone interacting in the Sumologic::Metrics project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/josacar/sumologic-metrics/blob/master/CODE_OF_CONDUCT.md).
## Thanks
- SegmentIO for their [analytics-ruby](https://github.com/segmentio/analytics-ruby) gem