logstash-output-log-courier 1.0.21.ga82ca4c

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 +81 -0
  3. metadata +76 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4704e1a9cb07bf6eb13caba7337cc01852e60c3a
4
+ data.tar.gz: 0177866ad006b39304168d16bdb9103996ae5e51
5
+ SHA512:
6
+ metadata.gz: d3dbdd079a514bfe2054c9036bac51f4ec5be4e5ec24255e62117f1cc7f798ee9ddf122b1db7a49ddcdf8b8d989a5aa18e0ed42b6bdecad4c902dec4133b10de
7
+ data.tar.gz: 23f9daf5a416ef73c76a99b2615ac28775b9396c77a98ff5fc83dac409d4bc8faf68bc55b57295fea11f5b3f27b94920be4cadf222d615e0dc3a1979f5318e3e
@@ -0,0 +1,81 @@
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 LogCourier < LogStash::Outputs::Base
24
+ config_name 'courier'
25
+ milestone 1
26
+
27
+ # The list of addresses Log Courier should send to
28
+ config :hosts, :validate => :array, :required => true
29
+
30
+ # The port to connect to
31
+ config :port, :validate => :number, :required => true
32
+
33
+ # CA certificate for validation of the server
34
+ config :ssl_ca, :validate => :path, :required => true
35
+
36
+ # Client SSL certificate to use
37
+ config :ssl_certificate, :validate => :path
38
+
39
+ # Client SSL key to use
40
+ config :ssl_key, :validate => :path
41
+
42
+ # SSL key passphrase to use
43
+ config :ssl_key_passphrase, :validate => :password
44
+
45
+ # Maximum number of events to spool before forcing a flush
46
+ config :spool_size, :validate => :number, :default => 1024
47
+
48
+ # Maximum time to wait for a full spool before forcing a flush
49
+ config :idle_timeout, :validate => :number, :default => 5
50
+
51
+ public
52
+
53
+ def register
54
+ require 'log-courier/client'
55
+
56
+ @client = LogCourier::Client.new(
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
+ end
67
+
68
+ public
69
+
70
+ def receive(event)
71
+ return unless output?(event)
72
+ if event == LogStash::SHUTDOWN
73
+ @client.shutdown
74
+ finished
75
+ return
76
+ end
77
+ @client.publish event.to_hash
78
+ end
79
+ end
80
+ end
81
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: logstash-output-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 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
+ 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: Transmit events from one Logstash instance to another using the Log Courier
75
+ protocol
76
+ test_files: []