logstash-output-jdbc 0.3.0.pre-java → 0.3.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/logstash/outputs/jdbc.rb +6 -1
- data/vendor/jar-dependencies/runtime-jars/HikariCP-2.4.2.jar +0 -0
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b8f273f1dcc4379d06b35ea9c5c8d8ece88ef00
|
4
|
+
data.tar.gz: 62955f3908c248600cf5587d1c43ea608eabf98c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fd66702d4e104abbe88649e605bc45241c819e39f5bcafe9feb5176a8d3e426ee280fc89699e0b8c8f2d0cc4824a7e56a3573199bade61574c8d986db9564e9
|
7
|
+
data.tar.gz: c04f7cde5c355dcc757c523c015ef74bf4310794e7f4ebb91777c3d7bc854b2aa58a18e4876b8a23a9f90ad55d88254ae932f7b9ca7e014476d81a164a15c747
|
data/README.md
CHANGED
@@ -43,6 +43,7 @@ For development:
|
|
43
43
|
| driver_auto_commit | Boolean | If the driver does not support auto commit, you should set this to false | No | True |
|
44
44
|
| driver_jar_path | String | File path to jar file containing your JDBC driver. This is optional, and all JDBC jars may be placed in $LOGSTASH_HOME/vendor/jar/jdbc instead. | No | |
|
45
45
|
| connection_string | String | JDBC connection URL | Yes | |
|
46
|
+
| connection_test | Boolean | Run a JDBC connection test. Some drivers do not function correctly, and you may need to disable the connection test to supress an error. Cockroach with the postgres JDBC driver is such an example. | No | Yes |
|
46
47
|
| username | String | JDBC username - this is optional as it may be included in the connection string, for many drivers | No | |
|
47
48
|
| password | String | JDBC password - this is optional as it may be included in the connection string, for many drivers | No | |
|
48
49
|
| statement | Array | An array of strings representing the SQL statement to run. Index 0 is the SQL statement that is prepared, all other array entries are passed in as parameters (in order). A parameter may either be a property of the event (i.e. "@timestamp", or "host") or a formatted string (i.e. "%{host} - %{message}" or "%{message}"). If a key is passed then it will be automatically converted as required for insertion into SQL. If it's a formatted string then it will be passed in verbatim. | Yes | |
|
@@ -83,6 +83,9 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
|
|
83
83
|
# Suitable for configuring retryable custom JDBC SQL state codes.
|
84
84
|
config :retry_sql_states, validate: :array, default: []
|
85
85
|
|
86
|
+
# Run a connection test on start.
|
87
|
+
config :connection_test, validate: :boolean, default: true
|
88
|
+
|
86
89
|
# Maximum number of sequential failed attempts, before we stop retrying.
|
87
90
|
# If set to < 1, then it will infinitely retry.
|
88
91
|
# At the default values this is a little over 10 minutes
|
@@ -148,10 +151,12 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
|
|
148
151
|
|
149
152
|
validate_connection_timeout = (@connection_timeout / 1000) / 2
|
150
153
|
|
154
|
+
return unless @connection_test
|
155
|
+
|
151
156
|
# Test connection
|
152
157
|
test_connection = @pool.getConnection
|
153
158
|
unless test_connection.isValid(validate_connection_timeout)
|
154
|
-
@logger.error('JDBC - Connection is not
|
159
|
+
@logger.error('JDBC - Connection is not reporting as validate. Either connection is invalid, or driver is not getting the appropriate response.')
|
155
160
|
end
|
156
161
|
test_connection.close
|
157
162
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-jdbc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- the_angry_angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|
@@ -98,16 +98,16 @@ dependencies:
|
|
98
98
|
name: rubocop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - '
|
101
|
+
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.41.2
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - '
|
108
|
+
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.41.2
|
111
111
|
description: This gem is a logstash plugin required to be installed on top of the
|
112
112
|
Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not
|
113
113
|
a stand-alone program
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- spec/outputs/jdbc_mysql_spec.rb
|
124
124
|
- spec/outputs/jdbc_spec.rb
|
125
125
|
- spec/outputs/jdbc_sqlite_spec.rb
|
126
|
+
- vendor/jar-dependencies/runtime-jars/HikariCP-2.4.2.jar
|
126
127
|
- vendor/jar-dependencies/runtime-jars/log4j-1.2.17.jar
|
127
128
|
- vendor/jar-dependencies/runtime-jars/slf4j-api-1.7.12.jar
|
128
129
|
- vendor/jar-dependencies/runtime-jars/slf4j-log4j12-1.7.21.jar
|
@@ -145,9 +146,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
146
|
version: '0'
|
146
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
148
|
requirements:
|
148
|
-
- - '
|
149
|
+
- - '>='
|
149
150
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
151
|
+
version: '0'
|
151
152
|
requirements:
|
152
153
|
- jar 'com.zaxxer:HikariCP', '2.4.2'
|
153
154
|
- jar 'org.slf4j:slf4j-log4j12', '1.7.21'
|