Created
July 26, 2012 20:16
-
-
Save gshutler/3184253 to your computer and use it in GitHub Desktop.
Direct logstash TCP client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$:.unshift File.dirname(__FILE__) | |
require 'bundler/setup' | |
require 'logstash' | |
require 'logstash/event' | |
require 'logstash/outputs/tcp' | |
require 'socket' | |
e = LogStash::Event.new | |
e.message = "SOCKETS" | |
e.source = Socket.gethostname | |
client = LogStash::Outputs::Tcp.new('host' => ['localhost'], 'port' => [10665]) | |
client.receive(e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment