logstash-output-courier 1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/logstash/outputs/courier.rb +84 -0
  3. metadata +76 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 092cee5d6c2f7e2bfdadf350d6eb5209988a0144
4
+ data.tar.gz: 08e3e193320c18d2433bf4032c3ad6c4663696b6
5
+ SHA512:
6
+ metadata.gz: 4b88e8a036b04864acbcec5d776ec635d4d60835a7f5a8aa2858c039bd449a008013a57355975463a61929f47d74edc0f75235ee4af09b3cbfb80fc680838374
7
+ data.tar.gz: 1fae63d95a5f8e4616aac625e8a05b18461bc17554c2d289ed6c617379d5e91e8e88f6733e66c00f7a645361370b00fd8891e380f2d13cbef487462c27e8991d
@@ -0,0 +1,84 @@
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 Outputs
22
+ # Send events using the Log Courier protocol
23
+ class Courier < LogStash::Outputs::Base
24
+ config_name 'courier'
25
+
26
+ # The list of addresses Log Courier should send to
27
+ config :hosts, :validate => :array, :required => true
28
+
29
+ # The port to connect to
30
+ config :port, :validate => :number, :required => true
31
+
32
+ # CA certificate for validation of the server
33
+ config :ssl_ca, :validate => :path, :required => true
34
+
35
+ # Client SSL certificate to use
36
+ config :ssl_certificate, :validate => :path
37
+
38
+ # Client SSL key to use
39
+ config :ssl_key, :validate => :path
40
+
41
+ # SSL key passphrase to use
42
+ config :ssl_key_passphrase, :validate => :password
43
+
44
+ # Maximum number of events to spool before forcing a flush
45
+ config :spool_size, :validate => :number, :default => 1024
46
+
47
+ # Maximum time to wait for a full spool before forcing a flush
48
+ config :idle_timeout, :validate => :number, :default => 5
49
+
50
+ public
51
+
52
+ def register
53
+ @logger.info 'Starting courier output'
54
+
55
+ options = {
56
+ logger: @logger,
57
+ addresses: @hosts,
58
+ port: @port,
59
+ ssl_ca: @ssl_ca,
60
+ ssl_certificate: @ssl_certificate,
61
+ ssl_key: @ssl_key,
62
+ ssl_key_passphrase: @ssl_key_passphrase,
63
+ spool_size: @spool_size,
64
+ idle_timeout: @idle_timeout,
65
+ }
66
+
67
+ require 'log-courier/client'
68
+ @client = LogCourier::Client.new(options)
69
+ end
70
+
71
+ public
72
+
73
+ def receive(event)
74
+ return unless output?(event)
75
+ if event == LogStash::SHUTDOWN
76
+ @client.shutdown
77
+ finished
78
+ return
79
+ end
80
+ @client.publish event.to_hash
81
+ end
82
+ end
83
+ end
84
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: logstash-output-courier
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.6'
5
+ platform: ruby
6
+ authors:
7
+ - Jason Woods
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: logstash-core
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.6'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ description: Log Courier Output Logstash Plugin
42
+ email:
43
+ - devel@jasonwoods.me.uk
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - lib/logstash/outputs/courier.rb
49
+ homepage: https://github.com/driskell/log-courier
50
+ licenses:
51
+ - Apache
52
+ metadata:
53
+ logstash_plugin: 'true'
54
+ logstash_group: output
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: '0'
69
+ requirements: []
70
+ rubyforge_project: nowarning
71
+ rubygems_version: 2.4.2
72
+ signing_key:
73
+ specification_version: 4
74
+ summary: Transmit events from one Logstash instance to another using the Log Courier
75
+ protocol
76
+ test_files: []