logstash-input-dead_letter_queue 1.0.0 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a9d666fbc7ae336aa2c0559581120cd101a7bc7
4
- data.tar.gz: d5dfb0bcdecd94f14c6b94a2213125ecad415aeb
3
+ metadata.gz: 52ee819033d61997dc53412e5df0a50b80ea81e9
4
+ data.tar.gz: 7defbd2c0f09d4871eecded6fe880cf5cf5f7ad9
5
5
  SHA512:
6
- metadata.gz: 58dc4f906ebac0e344b8804aac88a498a14e51f584704714d6853fb3c9dc94a42011804ef2678735291ca618ddf9152146439adc121b96e423482256dbc80bed
7
- data.tar.gz: a8118fd932a4e1cf06b454eda92754af425e109d0469c8af43c02abe83291579059943242886e011a3a2a3ac739163005a85f0bfb895fae9064d26c95bddf4a5
6
+ metadata.gz: 3628c14bbbe3c3436b08174261b223d975f81a3e495a4e9950d2f1d1f4efb7f3610e3d750e90b2cd6a8ff3133fbcec30d19ac7cbb9c0bedcb029154590c4ea07
7
+ data.tar.gz: d54bf94e03819f2aea92a6f4c99c5f9b6cd2212664a89ae71ba23053724e89c9e094234006b97190dd1b6d9c8708229692e3cdc3a00cc4bed7b2498a6aa420c6
data/CHANGELOG.md CHANGED
@@ -1,2 +1,11 @@
1
+ ## 1.0.3
2
+ - Docs: Fixed error in example plus made a few edits
3
+
4
+ ## 1.0.2
5
+ - internal: renamed DeadLetterQueueWriteManager to DeadLetterQueueWriter in tests
6
+
7
+ ## 1.0.1
8
+ - internal: rename DeadLetterQueueManager to DeadLetterQueueReader
9
+
1
10
  ## 1.0.0
2
- - init
11
+ - init
data/Gemfile CHANGED
@@ -1,3 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
6
+ use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
7
+
8
+ if Dir.exist?(logstash_path) && use_logstash_source
9
+ gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
10
+ gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
11
+ end
data/README.md CHANGED
@@ -8,6 +8,16 @@ It is fully free and fully open source. The license is Apache 2.0, meaning you a
8
8
 
9
9
  ## Documentation
10
10
 
11
+ ```sh
12
+ input {
13
+ dead_letter_queue {
14
+ path => "/var/logstash/data/dead_letter_queue"
15
+ timestamp => "2017-04-04T23:40:37"
16
+ }
17
+ }
18
+ ```
19
+
20
+
11
21
  https://www.elastic.co/guide/en/logstash/current/plugins-inputs-dead_letter_queue.html
12
22
 
13
23
  Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elastic.co/guide/en/logstash/current/).
@@ -0,0 +1,108 @@
1
+ :plugin: dead_letter_queue
2
+ :type: input
3
+
4
+ ///////////////////////////////////////////
5
+ START - GENERATED VARIABLES, DO NOT EDIT!
6
+ ///////////////////////////////////////////
7
+ :version: %VERSION%
8
+ :release_date: %RELEASE_DATE%
9
+ :changelog_url: %CHANGELOG_URL%
10
+ :include_path: ../../../logstash/docs/include
11
+ ///////////////////////////////////////////
12
+ END - GENERATED VARIABLES, DO NOT EDIT!
13
+ ///////////////////////////////////////////
14
+
15
+ [id="plugins-{type}-{plugin}"]
16
+
17
+ === Dead_letter_queue
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+ Logstash input to read events from Logstash's dead letter queue.
24
+
25
+ [source, sh]
26
+ -----------------------------------------
27
+ input {
28
+ dead_letter_queue {
29
+ path => "/var/logstash/data/dead_letter_queue"
30
+ start_timestamp => "2017-04-04T23:40:37"
31
+ }
32
+ }
33
+ -----------------------------------------
34
+
35
+
36
+ [id="plugins-{type}s-{plugin}-options"]
37
+ ==== Dead_letter_queue Input Configuration Options
38
+
39
+ This plugin supports the following configuration options plus the <<plugins-{type}s-common-options>> described later.
40
+
41
+ [cols="<,<,<",options="header",]
42
+ |=======================================================================
43
+ |Setting |Input type|Required
44
+ | <<plugins-{type}s-{plugin}-commit_offsets>> |<<boolean,boolean>>|No
45
+ | <<plugins-{type}s-{plugin}-path>> |a valid filesystem path|Yes
46
+ | <<plugins-{type}s-{plugin}-pipeline_id>> |<<string,string>>|No
47
+ | <<plugins-{type}s-{plugin}-sincedb_path>> |<<string,string>>|No
48
+ | <<plugins-{type}s-{plugin}-start_timestamp>> |<<string,string>>|No
49
+ |=======================================================================
50
+
51
+ Also see <<plugins-{type}s-common-options>> for a list of options supported by all
52
+ input plugins.
53
+
54
+ &nbsp;
55
+
56
+ [id="plugins-{type}s-{plugin}-commit_offsets"]
57
+ ===== `commit_offsets`
58
+
59
+ * Value type is <<boolean,boolean>>
60
+ * Default value is `true`
61
+
62
+ Specifies whether this input should commit offsets as it processes the events.
63
+ Typically you specify `false` when you want to iterate multiple times over the
64
+ events in the dead letter queue, but don't want to save state. This is when you
65
+ are exploring the events in the dead letter queue.
66
+
67
+ [id="plugins-{type}s-{plugin}-path"]
68
+ ===== `path`
69
+
70
+ * This is a required setting.
71
+ * Value type is <<path,path>>
72
+ * There is no default value for this setting.
73
+
74
+ Path to the dead letter queue directory that was created by a Logstash instance.
75
+ This is the path from which "dead" events are read and is typically configured
76
+ in the original Logstash instance with the setting `path.dead_letter_queue`.
77
+
78
+ [id="plugins-{type}s-{plugin}-pipeline_id"]
79
+ ===== `pipeline_id`
80
+
81
+ * Value type is <<string,string>>
82
+ * Default value is `"main"`
83
+
84
+ ID of the pipeline whose events you want to read from.
85
+
86
+ [id="plugins-{type}s-{plugin}-sincedb_path"]
87
+ ===== `sincedb_path`
88
+
89
+ * Value type is <<string,string>>
90
+ * There is no default value for this setting.
91
+
92
+ Path of the sincedb database file (keeps track of the current position of dead letter queue) that
93
+ will be written to disk. The default will write sincedb files to `<path.data>/plugins/inputs/dead_letter_queue`.
94
+
95
+ NOTE: This value must be a file path and not a directory path.
96
+
97
+ [id="plugins-{type}s-{plugin}-start_timestamp"]
98
+ ===== `start_timestamp`
99
+
100
+ * Value type is <<string,string>>
101
+ * There is no default value for this setting.
102
+
103
+ Timestamp in ISO8601 format from when you want to start processing the events from.
104
+ For example, `2017-04-04T23:40:37`.
105
+
106
+
107
+
108
+ include::{include_path}/{type}.asciidoc[]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-dead_letter_queue'
3
- s.version = '1.0.0'
3
+ s.version = '1.0.3'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = 'Logstash input to read dead lettered events'
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.require_paths = ['lib']
11
11
 
12
12
  # Files
13
- s.files = Dir['lib/**/*.rb','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
13
+ s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
14
14
 
15
15
  # Tests
16
16
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
@@ -4,9 +4,23 @@ require "logstash/inputs/dead_letter_queue"
4
4
  require "concurrent"
5
5
 
6
6
  describe LogStash::Inputs::DeadLetterQueue do
7
- subject { LogStash::Inputs::DeadLetterQueue.new(config) }
7
+ let(:pipeline_id) { SecureRandom.hex(8)}
8
+ let(:path) { Dir.tmpdir }
9
+ let(:directory) { File.join(path, pipeline_id)}
8
10
 
9
- it "should register" do
11
+ subject { LogStash::Inputs::DeadLetterQueue.new({ "path" => path,
12
+ "pipeline_id" => pipeline_id}) }
13
+
14
+ before(:each) do
15
+ Dir.mkdir(directory)
16
+ end
17
+
18
+ it 'should register' do
10
19
  expect {subject.register}.to_not raise_error
11
20
  end
21
+
22
+
23
+ after(:each) do
24
+ FileUtils.remove_entry_secure directory
25
+ end
12
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-dead_letter_queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-07 00:00:00.000000000 Z
11
+ date: 2017-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -71,6 +71,8 @@ files:
71
71
  - LICENSE
72
72
  - NOTICE.TXT
73
73
  - README.md
74
+ - docs/index.asciidoc
75
+ - lib/logstash-input-dead_letter_queue.jar
74
76
  - lib/logstash/inputs/dead_letter_queue.rb
75
77
  - logstash-input-dead_letter_queue.gemspec
76
78
  - spec/unit/inputs/dead_letter_queue_spec.rb