logstash-input-drupal_dblog 0.1.7-java → 2.0.1-java

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: da385a2ba594cec801f5e79c62409eb22ca6d3ca
4
- data.tar.gz: f98d793ba28ed52e3f116c82f626885719cf4049
3
+ metadata.gz: fde8c6ff335e9741db39a6c6488f32426898d7b8
4
+ data.tar.gz: 84ccb08340c9e926321778581eee982ae9b211bb
5
5
  SHA512:
6
- metadata.gz: 7f875bd00452139cb0492d31df887eff007fb7ded2d35601df087151f1ef604167047d918d10df38617f4bc32cd65a7cecefdb9ace6bdc92fbaf7fb63aa5995b
7
- data.tar.gz: ffc66e492d6da30a996851f54bc3be3a8ab25ba3513fda9e73c891a9667a8a4e08fe0740e0d91eb7631c123aa0f84109e5c1ff1077a7a63fde65facf6d5703aa
6
+ metadata.gz: bc72da5bb763eca816c57fa36a661911804993e78777f60292ca4b4f603a7ba6de84ca54d297b7ee5baf71ac1c5f92aac2d3cf1f572434cb6976e4b011b3b6db
7
+ data.tar.gz: 15ff5e1830aaac955ae7d11f54aa235e7ab68c5cdeb1136079f7540cc1e3d61a432d1e8d2cf98a04104bc0128293937d2d6ac7cb48c9b550df2760509a00797a
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## 2.0.0
2
+ - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
3
+ instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
4
+ - Dependency on logstash-core update to 2.0
5
+
data/NOTICE.TXT ADDED
@@ -0,0 +1,5 @@
1
+ Elasticsearch
2
+ Copyright 2012-2015 Elasticsearch
3
+
4
+ This product includes software developed by The Apache Software
5
+ Foundation (http://www.apache.org/).
data/README.md CHANGED
@@ -1,19 +1,19 @@
1
1
  # Logstash Plugin
2
2
 
3
- This is a plugin for [Logstash](https://github.com/elasticsearch/logstash).
3
+ This is a plugin for [Logstash](https://github.com/elastic/logstash).
4
4
 
5
5
  It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
6
6
 
7
7
  ## Documentation
8
8
 
9
- 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.elasticsearch.org/guide/en/logstash/current/).
9
+ 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/).
10
10
 
11
11
  - For formatting code or config example, you can use the asciidoc `[source,ruby]` directive
12
- - For more asciidoc formatting tips, see the excellent reference here https://github.com/elasticsearch/docs#asciidoc-guide
12
+ - For more asciidoc formatting tips, see the excellent reference here https://github.com/elastic/docs#asciidoc-guide
13
13
 
14
14
  ## Need Help?
15
15
 
16
- Need help? Try #logstash on freenode IRC or the logstash-users@googlegroups.com mailing list.
16
+ Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/logstash discussion forum.
17
17
 
18
18
  ## Developing
19
19
 
@@ -83,4 +83,4 @@ Programming is not a required skill. Whatever you've seen about open source and
83
83
 
84
84
  It is more important to the community that you are able to contribute.
85
85
 
86
- For more information about contributing, see the [CONTRIBUTING](https://github.com/elasticsearch/logstash/blob/master/CONTRIBUTING.md) file.
86
+ For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
@@ -2,7 +2,8 @@
2
2
  require "date"
3
3
  require "logstash/inputs/base"
4
4
  require "logstash/namespace"
5
-
5
+ require "logstash-input-drupal_dblog_jars"
6
+ require "stud/interval"
6
7
 
7
8
  # Retrieve watchdog log events from a Drupal installation with DBLog enabled.
8
9
  # The events are pulled out directly from the database.
@@ -115,7 +116,7 @@ class LogStash::Inputs::DrupalDblog < LogStash::Inputs::Base
115
116
  def run(output_queue)
116
117
  @logger.info("Initializing drupal_dblog")
117
118
 
118
- loop do
119
+ while !stop?
119
120
  @logger.debug("Drupal DBLog: Starting to fetch new watchdog entries")
120
121
  start = Time.now.to_i
121
122
 
@@ -133,9 +134,11 @@ class LogStash::Inputs::DrupalDblog < LogStash::Inputs::Base
133
134
  sleepTime = @interval * 60 - timeTaken
134
135
  if sleepTime > 0
135
136
  @logger.debug("Drupal DBLog: Sleeping for #{sleepTime} seconds")
136
- sleep(sleepTime)
137
+ Stud.stoppable_sleep(sleepTime) do
138
+ stop?
139
+ end
137
140
  end
138
- end # loop
141
+ end
139
142
  end # def run
140
143
 
141
144
  private
@@ -195,7 +198,7 @@ class LogStash::Inputs::DrupalDblog < LogStash::Inputs::Base
195
198
  end
196
199
 
197
200
  # Fetch new entries, and create the event
198
- while true
201
+ while !stop?
199
202
  results = get_db_rows(lastWid)
200
203
  if results.length() < 1
201
204
  break
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-drupal_dblog'
4
- s.version = '0.1.7'
4
+ s.version = '2.0.1'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Retrieve watchdog log events from a Drupal installation with DBLog enabled"
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/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 = `git ls-files`.split($\)+::Dir.glob('vendor/*')
14
+ s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
15
15
 
16
16
  # Tests
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
@@ -21,9 +21,10 @@ Gem::Specification.new do |s|
21
21
 
22
22
  # Gem dependencies
23
23
 
24
- s.add_runtime_dependency 'logstash-core', '>= 1.4.0', '< 2.0.0'
24
+ s.add_runtime_dependency "logstash-core", ">= 2.0.0.snapshot", "< 3.0.0"
25
25
  s.add_runtime_dependency 'logstash-codec-plain'
26
26
  s.add_runtime_dependency 'php_serialize'
27
+ s.add_runtime_dependency 'stud', '~> 0.0.22'
27
28
 
28
29
  if RUBY_PLATFORM == 'java'
29
30
  s.platform = RUBY_PLATFORM
@@ -1 +1,8 @@
1
1
  require "logstash/devutils/rspec/spec_helper"
2
+ require "logstash/inputs/drupal_dblog"
3
+
4
+ describe LogStash::Inputs::DrupalDblog do
5
+ it_behaves_like "an interruptible input plugin" do
6
+ let(:config) { { "databases" => {} } }
7
+ end
8
+ end
metadata CHANGED
@@ -1,24 +1,24 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-drupal_dblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 2.0.1
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - '>='
17
17
  - !ruby/object:Gem::Version
18
- version: 1.4.0
18
+ version: 2.0.0.snapshot
19
19
  - - <
20
20
  - !ruby/object:Gem::Version
21
- version: 2.0.0
21
+ version: 3.0.0
22
22
  name: logstash-core
23
23
  prerelease: false
24
24
  type: :runtime
@@ -26,10 +26,10 @@ dependencies:
26
26
  requirements:
27
27
  - - '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 1.4.0
29
+ version: 2.0.0.snapshot
30
30
  - - <
31
31
  - !ruby/object:Gem::Version
32
- version: 2.0.0
32
+ version: 3.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
@@ -58,6 +58,20 @@ dependencies:
58
58
  - - '>='
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ requirement: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ~>
65
+ - !ruby/object:Gem::Version
66
+ version: 0.0.22
67
+ name: stud
68
+ prerelease: false
69
+ type: :runtime
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ~>
73
+ - !ruby/object:Gem::Version
74
+ version: 0.0.22
61
75
  - !ruby/object:Gem::Dependency
62
76
  requirement: !ruby/object:Gem::Requirement
63
77
  requirements:
@@ -92,12 +106,12 @@ executables: []
92
106
  extensions: []
93
107
  extra_rdoc_files: []
94
108
  files:
95
- - .gitignore
109
+ - CHANGELOG.md
96
110
  - CONTRIBUTORS
97
111
  - Gemfile
98
112
  - LICENSE
113
+ - NOTICE.TXT
99
114
  - README.md
100
- - Rakefile
101
115
  - lib/logstash-input-drupal_dblog_jars.rb
102
116
  - lib/logstash/inputs/drupal_dblog.rb
103
117
  - lib/logstash/inputs/drupal_dblog/jdbcconnection.rb
@@ -126,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
140
  version: '0'
127
141
  requirements: []
128
142
  rubyforge_project:
129
- rubygems_version: 2.1.9
143
+ rubygems_version: 2.4.8
130
144
  signing_key:
131
145
  specification_version: 4
132
146
  summary: Retrieve watchdog log events from a Drupal installation with DBLog enabled
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- *.gem
2
- Gemfile.lock
3
- .bundle
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- @files=[]
2
-
3
- task :default do
4
- system("rake -T")
5
- end
6
-
7
- require "logstash/devutils/rake"