Skip to content

Instantly share code, notes, and snippets.

View johlym's full-sized avatar

Johnathan Lyman johlym

View GitHub Profile
#!/usr/bin/env ruby
require 'socket'
LISTEN_PORT = 55514
DESTINATION_HOST = "logsN.papertrailapp.com"
DESTINATION_PORT = XXXXX
class SyslogRelay
PARSER = /^(<\d+>\S+\s+\S+\s+\S+) (\S+) ([^:]+): (.*)$/
require 'daemons'
Daemons.run('syslog_relay.rb')