logstash-input-log-courier 1.0.21.ga82ca4c
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/logstash/inputs/courier.rb +98 -0
- metadata +75 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cc1958d906d7f74a295ccc0228ef6eedab7548cf
|
4
|
+
data.tar.gz: 2be165d8e9ac8227d6d31d973f80bca0756334de
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ebed00ba822fc9386cd8f6b2326fafc6708f3b8a4b40583dae6a86caa239c7cffbdbc14b992e4f9977d8fb55d9faf305d1cb8cbd56609f7c22b7fe8081c8fa13
|
7
|
+
data.tar.gz: 7bb73d64f271887f5cf20de70a14cf1fd996d807d7ffc29fcb2d3fc83ced11198204be719e00a206c02590d32224d71c27187d360d350764e05d760f547e0713
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# Copyright 2014 Jason Woods.
|
4
|
+
#
|
5
|
+
# This file is a modification of code from Logstash Forwarder.
|
6
|
+
# Copyright 2012-2013 Jordan Sissel and contributors.
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
|
20
|
+
module LogStash
|
21
|
+
module Inputs
|
22
|
+
# Receive events over the Log Courier protocol
|
23
|
+
class Courier < LogStash::Inputs::Base
|
24
|
+
config_name 'courier'
|
25
|
+
milestone 1
|
26
|
+
|
27
|
+
default :codec, 'plain'
|
28
|
+
|
29
|
+
# The IP address to listen on
|
30
|
+
config :host, :validate => :string, :default => '0.0.0.0'
|
31
|
+
|
32
|
+
# The port to listen on
|
33
|
+
config :port, :validate => :number, :required => true
|
34
|
+
|
35
|
+
# The transport type to use
|
36
|
+
config :transport, :validate => :string, :default => 'tls'
|
37
|
+
|
38
|
+
# SSL certificate to use
|
39
|
+
config :ssl_certificate, :validate => :path
|
40
|
+
|
41
|
+
# SSL key to use
|
42
|
+
config :ssl_key, :validate => :path
|
43
|
+
|
44
|
+
# SSL key passphrase to use
|
45
|
+
config :ssl_key_passphrase, :validate => :password
|
46
|
+
|
47
|
+
# Whether or not to verify client certificates
|
48
|
+
config :ssl_verify, :validate => :boolean, :default => false
|
49
|
+
|
50
|
+
# When verifying client certificates, also trust those signed by the system's default CA bundle
|
51
|
+
config :ssl_verify_default_ca, :validate => :boolean, :default => false
|
52
|
+
|
53
|
+
# CA certificate to use when verifying client certificates
|
54
|
+
config :ssl_verify_ca, :validate => :path
|
55
|
+
|
56
|
+
# Curve secret key
|
57
|
+
config :curve_secret_key, :validate => :string
|
58
|
+
|
59
|
+
# Max packet size
|
60
|
+
config :max_packet_size, :validate => :number
|
61
|
+
|
62
|
+
public
|
63
|
+
|
64
|
+
def register
|
65
|
+
@logger.info('Starting courier input listener', :address => "#{@host}:#{@port}")
|
66
|
+
|
67
|
+
options = {
|
68
|
+
logger: @logger,
|
69
|
+
address: @host,
|
70
|
+
port: @port,
|
71
|
+
transport: @transport,
|
72
|
+
ssl_certificate: @ssl_certificate,
|
73
|
+
ssl_key: @ssl_key,
|
74
|
+
ssl_key_passphrase: @ssl_key_passphrase,
|
75
|
+
ssl_verify: @ssl_verify,
|
76
|
+
ssl_verify_default_ca: @ssl_verify_default_ca,
|
77
|
+
ssl_verify_ca: @ssl_verify_ca,
|
78
|
+
curve_secret_key: @curve_secret_key
|
79
|
+
}
|
80
|
+
|
81
|
+
options[:max_packet_size] = @max_packet_size unless @max_packet_size.nil?
|
82
|
+
|
83
|
+
require 'log-courier/server'
|
84
|
+
@log_courier = LogCourier::Server.new options
|
85
|
+
end
|
86
|
+
|
87
|
+
public
|
88
|
+
|
89
|
+
def run(output_queue)
|
90
|
+
@log_courier.run do |event|
|
91
|
+
event = LogStash::Event.new(event)
|
92
|
+
decorate event
|
93
|
+
output_queue << event
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: logstash-input-log-courier
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.21.ga82ca4c
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jason Woods
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: logstash
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.4'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.4'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: log-courier
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.21.ga82ca4c
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.21.ga82ca4c
|
41
|
+
description: Log Courier Input Logstash Plugin
|
42
|
+
email:
|
43
|
+
- devel@jasonwoods.me.uk
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- lib/logstash/inputs/courier.rb
|
49
|
+
homepage: https://github.com/driskell/log-courier
|
50
|
+
licenses:
|
51
|
+
- Apache
|
52
|
+
metadata:
|
53
|
+
logstash_plugin: 'true'
|
54
|
+
group: input
|
55
|
+
post_install_message:
|
56
|
+
rdoc_options: []
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>'
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.3.1
|
69
|
+
requirements: []
|
70
|
+
rubyforge_project: nowarning
|
71
|
+
rubygems_version: 2.4.2
|
72
|
+
signing_key:
|
73
|
+
specification_version: 4
|
74
|
+
summary: Receive events from Log Courier and Logstash using the Log Courier protocol
|
75
|
+
test_files: []
|