logstash-filter-sleep 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 557f29612aab142f21baed492f22ff142bda0ff3
4
- data.tar.gz: 24a7d91dbc4769ca829332b9e7f827bb76765366
3
+ metadata.gz: 314c409bf1daada52a5d06807255db5e4d44a37f
4
+ data.tar.gz: 62f4b0294d31f1d467f403fcbe4ec1aff54106a9
5
5
  SHA512:
6
- metadata.gz: 40f691b559423b76048d6abb5a12611ca34ffb54176f2f7e1f7f55017b7520ecfb107784dc11cf0222380b82039204680f1725d47219ab4e5a0bc53dd977fa66
7
- data.tar.gz: 1ff75fb5a927dc3dcca4347275c838426ebaa6c96292dad47831842181d7cee610e4aeffe10254851d2849cc3ef708c61d32d91f15b07b413c028eb6ce4411ca
6
+ metadata.gz: 35f83090d22fffd517dd17b2e03cc9fecd196fd1f858fd50755a2060b7f516c8396a6fe89ec69c2a2b10484565e73c3b990881cda1e98bfd6a3ab6539302fa48
7
+ data.tar.gz: ab626be6ad5d76624aa64aefc1029670f85edbd5416d9ac86b1f0023f9536c970cd9bdbd0b79f8347c011a0504c016b7ddfb8727bc1a324a737d878c135ac887
data/Gemfile CHANGED
@@ -1,4 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in logstash-mass_effect.gemspec
4
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
@@ -0,0 +1,119 @@
1
+ :plugin: sleep
2
+ :type: filter
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
+ === Sleep filter plugin
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+ Sleep a given amount of time. This will cause logstash
24
+ to stall for the given amount of time. This is useful
25
+ for rate limiting, etc.
26
+
27
+
28
+ [id="plugins-{type}s-{plugin}-options"]
29
+ ==== Sleep Filter Configuration Options
30
+
31
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
32
+
33
+ [cols="<,<,<",options="header",]
34
+ |=======================================================================
35
+ |Setting |Input type|Required
36
+ | <<plugins-{type}s-{plugin}-every>> |<<string,string>>|No
37
+ | <<plugins-{type}s-{plugin}-replay>> |<<boolean,boolean>>|No
38
+ | <<plugins-{type}s-{plugin}-time>> |<<string,string>>|No
39
+ |=======================================================================
40
+
41
+ Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
42
+ filter plugins.
43
+
44
+ &nbsp;
45
+
46
+ [id="plugins-{type}s-{plugin}-every"]
47
+ ===== `every`
48
+
49
+ * Value type is <<string,string>>
50
+ * Default value is `1`
51
+
52
+ Sleep on every N'th. This option is ignored in replay mode.
53
+
54
+ Example:
55
+ [source,ruby]
56
+ filter {
57
+ sleep {
58
+ time => "1" # Sleep 1 second
59
+ every => 10 # on every 10th event
60
+ }
61
+ }
62
+
63
+ [id="plugins-{type}s-{plugin}-replay"]
64
+ ===== `replay`
65
+
66
+ * Value type is <<boolean,boolean>>
67
+ * Default value is `false`
68
+
69
+ Enable replay mode.
70
+
71
+ Replay mode tries to sleep based on timestamps in each event.
72
+
73
+ The amount of time to sleep is computed by subtracting the
74
+ previous event's timestamp from the current event's timestamp.
75
+ This helps you replay events in the same timeline as original.
76
+
77
+ If you specify a `time` setting as well, this filter will
78
+ use the `time` value as a speed modifier. For example,
79
+ a `time` value of 2 will replay at double speed, while a
80
+ value of 0.25 will replay at 1/4th speed.
81
+
82
+ For example:
83
+ [source,ruby]
84
+ filter {
85
+ sleep {
86
+ time => 2
87
+ replay => true
88
+ }
89
+ }
90
+
91
+ The above will sleep in such a way that it will perform
92
+ replay 2-times faster than the original time speed.
93
+
94
+ [id="plugins-{type}s-{plugin}-time"]
95
+ ===== `time`
96
+
97
+ * Value type is <<string,string>>
98
+ * There is no default value for this setting.
99
+
100
+ The length of time to sleep, in seconds, for every event.
101
+
102
+ This can be a number (eg, 0.5), or a string (eg, `%{foo}`)
103
+ The second form (string with a field value) is useful if
104
+ you have an attribute of your event that you want to use
105
+ to indicate the amount of time to sleep.
106
+
107
+ Example:
108
+ [source,ruby]
109
+ filter {
110
+ sleep {
111
+ # Sleep 1 second for every event.
112
+ time => "1"
113
+ }
114
+ }
115
+
116
+
117
+
118
+ [id="plugins-{type}s-{plugin}-common-options"]
119
+ include::{include_path}/{type}.asciidoc[]
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-sleep'
4
- s.version = '3.0.3'
4
+ s.version = '3.0.4'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Sleep a given amount of time"
7
7
  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"
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.require_paths = ["lib"]
12
12
 
13
13
  # Files
14
- s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
14
+ s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
15
15
 
16
16
  # Tests
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-sleep
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-26 00:00:00.000000000 Z
11
+ date: 2017-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -56,6 +56,7 @@ files:
56
56
  - LICENSE
57
57
  - NOTICE.TXT
58
58
  - README.md
59
+ - docs/index.asciidoc
59
60
  - lib/logstash/filters/sleep.rb
60
61
  - logstash-filter-sleep.gemspec
61
62
  - spec/filters/sleep_spec.rb