https://github.com/umbrellio/telegraf_agent
Telegraf agent - a class for sending data to the telegraf server. Simple.
https://github.com/umbrellio/telegraf_agent
influxdata-telegraf influxdb telegraf telegraf-agent
Last synced: 4 days ago
JSON representation
Telegraf agent - a class for sending data to the telegraf server. Simple.
- Host: GitHub
- URL: https://github.com/umbrellio/telegraf_agent
- Owner: umbrellio
- License: mit
- Created: 2019-01-17T11:23:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-01T12:16:48.000Z (over 6 years ago)
- Last Synced: 2025-12-05T12:41:28.980Z (7 months ago)
- Topics: influxdata-telegraf, influxdb, telegraf, telegraf-agent
- Language: Ruby
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TelegrafAgent
[](https://travis-ci.org/umbrellio/telegraf_agent)
[](https://coveralls.io/github/umbrellio/telegraf_agent?branch=master)
[](https://badge.fury.io/rb/telegraf_agent)
Class for sending data to the telegraf server.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'telegraf_agent'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install telegraf_agent
## Usage
Just initialize an agent like:
```ruby
logger = Logger.new(STDOUT)
url = "tcp://localhost:1234"
agent = TelegrafAgent.new(url: url, logger: logger)
```
Logger param is optional.
And then use:
```ruby
tags = { env: Rails.env }
values = { action: "index", duration: 0.2 }
agent.write("SuperProject", tags: tags, values: values)
```
All params are required.
## License
Released under MIT License.
## Authors
Created by Aleksey Bespalov.