项目作者: umbrellio

项目描述 :
Telegraf agent - a class for sending data to the telegraf server. Simple.
高级语言: Ruby
项目地址: git://github.com/umbrellio/telegraf_agent.git
创建时间: 2019-01-17T11:23:35Z
项目社区:https://github.com/umbrellio/telegraf_agent

开源协议:MIT License

下载


TelegrafAgent

Build Status
Coverage Status
Gem Version

Class for sending data to the telegraf server.

Installation

Add this line to your application’s Gemfile:

  1. gem 'telegraf_agent'

And then execute:

  1. $ bundle

Or install it yourself as:

  1. $ gem install telegraf_agent

Usage

Just initialize an agent like:

  1. logger = Logger.new(STDOUT)
  2. url = "tcp://localhost:1234"
  3. agent = TelegrafAgent.new(url: url, logger: logger)

Logger param is optional.

And then use:

  1. tags = { env: Rails.env }
  2. values = { action: "index", duration: 0.2 }
  3. agent.write("SuperProject", tags: tags, values: values)

All params are required.

License

Released under MIT License.

Authors

Created by Aleksey Bespalov.


Supported by Umbrellio