logstash-input-sqlite 3.0.0 → 3.0.1

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: a82e2c4f0880bf98009df878daaf14b164df5af1
4
- data.tar.gz: f7a8acf692f7ab00c96b77863d3cea9f5d49b7fb
3
+ metadata.gz: 4a8fbdef5609e78c4e4ef311212e63b776d5880c
4
+ data.tar.gz: 74f2f4c8069edd45c02eb9e0f8c6045f12373295
5
5
  SHA512:
6
- metadata.gz: 271ffe00679dda24729f266600c155cf94cfd180fc9f4701d9472c300ff229715419deb4afc561f32cd0109732591a8a00a94a41f73e9d89a30b79a4c9fb5e9d
7
- data.tar.gz: f63b821906d9a52b33fbba5efebf6aa9ba68b3e99f4a6c33516a14880a57f9fbbd23b85816c4bc2a0dce5f97b71504b20fe3d1599a414dde7fcd56af60af9136
6
+ metadata.gz: f43703761a2eccb274d6e8628d778d705e4eb419e2d021e87b392732b8bfa2b5063e976c5e307f9a67699732a5c4a58b20c709d890df3020a334893a2696b2f6
7
+ data.tar.gz: 50d929dc4b4f6f07e963b094d4a9f555881e4d025fd37b0ed5871b59b22ddecc0a334c396b5d99cd351b3ea32230f29c6aa668e10a5616c9778efcfbc90e3f90
data/Gemfile CHANGED
@@ -1,2 +1,11 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
2
+
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,124 @@
1
+ :plugin: sqlite
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
+ === Sqlite input plugin
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+ Read rows from an sqlite database.
24
+
25
+ This is most useful in cases where you are logging directly to a table.
26
+ Any tables being watched must have an `id` column that is monotonically
27
+ increasing.
28
+
29
+ All tables are read by default except:
30
+
31
+ * ones matching `sqlite_%` - these are internal/adminstrative tables for sqlite
32
+ * `since_table` - this is used by this plugin to track state.
33
+
34
+ Example
35
+ [source,sql]
36
+ % sqlite /tmp/example.db
37
+ sqlite> CREATE TABLE weblogs (
38
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
39
+ ip STRING,
40
+ request STRING,
41
+ response INTEGER);
42
+ sqlite> INSERT INTO weblogs (ip, request, response)
43
+ VALUES ("1.2.3.4", "/index.html", 200);
44
+
45
+ Then with this logstash config:
46
+ [source,ruby]
47
+ input {
48
+ sqlite {
49
+ path => "/tmp/example.db"
50
+ type => weblogs
51
+ }
52
+ }
53
+ output {
54
+ stdout {
55
+ debug => true
56
+ }
57
+ }
58
+
59
+ Sample output:
60
+ [source,ruby]
61
+ {
62
+ "@source" => "sqlite://sadness/tmp/x.db",
63
+ "@tags" => [],
64
+ "@fields" => {
65
+ "ip" => "1.2.3.4",
66
+ "request" => "/index.html",
67
+ "response" => 200
68
+ },
69
+ "@timestamp" => "2013-05-29T06:16:30.850Z",
70
+ "@source_host" => "sadness",
71
+ "@source_path" => "/tmp/x.db",
72
+ "@message" => "",
73
+ "@type" => "foo"
74
+ }
75
+
76
+
77
+ [id="plugins-{type}s-{plugin}-options"]
78
+ ==== Sqlite Input Configuration Options
79
+
80
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
81
+
82
+ [cols="<,<,<",options="header",]
83
+ |=======================================================================
84
+ |Setting |Input type|Required
85
+ | <<plugins-{type}s-{plugin}-batch>> |<<number,number>>|No
86
+ | <<plugins-{type}s-{plugin}-exclude_tables>> |<<array,array>>|No
87
+ | <<plugins-{type}s-{plugin}-path>> |<<string,string>>|Yes
88
+ |=======================================================================
89
+
90
+ Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
91
+ input plugins.
92
+
93
+ &nbsp;
94
+
95
+ [id="plugins-{type}s-{plugin}-batch"]
96
+ ===== `batch`
97
+
98
+ * Value type is <<number,number>>
99
+ * Default value is `5`
100
+
101
+ How many rows to fetch at a time from each `SELECT` call.
102
+
103
+ [id="plugins-{type}s-{plugin}-exclude_tables"]
104
+ ===== `exclude_tables`
105
+
106
+ * Value type is <<array,array>>
107
+ * Default value is `[]`
108
+
109
+ Any tables to exclude by name.
110
+ By default all tables are followed.
111
+
112
+ [id="plugins-{type}s-{plugin}-path"]
113
+ ===== `path`
114
+
115
+ * This is a required setting.
116
+ * Value type is <<string,string>>
117
+ * There is no default value for this setting.
118
+
119
+ The path to the sqlite database file.
120
+
121
+
122
+
123
+ [id="plugins-{type}s-{plugin}-common-options"]
124
+ include::{include_path}/{type}.asciidoc[]
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-sqlite'
4
- s.version = '3.0.0'
4
+ s.version = '3.0.1'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Read rows from an sqlite database."
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-input-sqlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-10 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
@@ -98,6 +98,7 @@ files:
98
98
  - LICENSE
99
99
  - NOTICE.TXT
100
100
  - README.md
101
+ - docs/index.asciidoc
101
102
  - lib/logstash/inputs/sqlite.rb
102
103
  - logstash-input-sqlite.gemspec
103
104
  - spec/inputs/sqlite_spec.rb