No commit activity in last 3 years
No release in over 3 years
Fluent plugin that uses em-websocket as input. Don't have tests yet, but it works for me. For more info visit homepage https://github.com/sebryu/fluent_plugin_in_websocket.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0

Runtime

~> 0.5.1
< 2, >= 0.11.0
 Project Readme

Websocket input plugin for Fluentd

fluent-plugin-in-websocket adds websocket as input in Fluentd

Installation

Install your gem with fluent-plugin-gem or td-agent-gem (depending on what are you using):

fluent-gem install fluent-plugin-in-websocket
td-agent-gem install fluent-plugin-in-websocket

Usage

To use it as input in fluent you will have to add it to your fluent/td-agent config (host and port are default values).

<source>
  @type websocket
  @id websocket
  host 127.0.0.1
  port 8080
</source>

Then when you are sending data to websocket, you have to supply label, and record. e.g. in javascript (for localhost)

const ws = new WebSocket('ws://127.0.0.1:8080/');
const label = 'yourapp.somelabel';
const record = {'test': 1, 'some': {'nested': 2}};
const message = JSON.stringify({label, record});
ws.send(message);

Development

I have created this gems for my needs. If you want, send me notice what more would you want in this plugin, or submit pull request.

License

The gem is available as open source under the terms of the MIT License.