You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 17, 2019. It is now read-only.
* 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.
27
-
* flush_size, number, default = 1000, number of entries to buffer before sending to SQL
28
-
* idle_flush_time, number, default = 1, number of idle seconds before sending data to SQL, even if the flush_size has not been reached. If you modify this value you should also consider altering max_repeat_exceptions_time
29
-
* max_repeat_exceptions, number, default = 5, number of times the same exception can repeat before we stop logstash. Set to a value less than 1 if you never want it to stop
30
-
* max_repeat_exceptions_time, number, default = 30, maxium number of seconds between exceptions before they're considered "different" exceptions. If you modify idle_flush_time you should consider this value
33
+
34
+
| Option | Type | Description | Required? |
35
+
| ------ | ---- | ----------- | --------- |
36
+
| driver_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 |
| username | String | JDBC username - this is optional as it may be included in the connection string, for many drivers | No |
39
+
| password | String | JDBC password - this is optional as it may be included in the connection string, for many drivers | No |
40
+
| 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 |
41
+
| unsafe_statement | Boolean | If yes, the statement is evaluated for event fields - this allows you to use dynamic table names, etc. **This is highly dangerous** and you should **not** use this unless you are 100% sure that the field(s) you are passing in are 100% safe. Failure to do so will result in possible SQL injections. Please be aware that there is also a potential performance penalty as each event must be evaluated and inserted into SQL one at a time, where as when this is false multiple events are inserted at once. Example statement: [ "insert into %{table_name_field} (column) values(?)", "fieldname" ]| No |
42
+
| max_pool_size | Number | Maximum number of connections to open to the SQL server at any 1 time | No |
43
+
| connection_timeout | Number | Number of seconds before a SQL connection is closed | No |
44
+
| flush_size | Number | Maximum number of entries to buffer before sending to SQL - if this is reached before idle_flush_time | No |
45
+
| idle_flush_time | Number | Number of idle seconds before sending data to SQL - even if the flush_size has not yet been reached | No |
46
+
| max_repeat_exceptions | Number | Number of times the same exception can repeat before we stop logstash. Set to a value less than 1 if you never want it to stop | No |
47
+
| max_repeat_exceptions_time | Number | Maxium number of seconds between exceptions before they're considered "different" exceptions. If you modify idle_flush_time you should consider this value | No |
31
48
32
49
## Example configurations
50
+
If you have a working sample configuration, for a DB thats not listed, pull requests are welcome.
51
+
33
52
### SQLite3
34
53
* Tested using https://bitbucket.org/xerial/sqlite-jdbc
Copy file name to clipboardExpand all lines: logstash-output-jdbc.gemspec
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Gem::Specification.newdo |s|
2
2
s.name='logstash-output-jdbc'
3
-
s.version="0.2.0.rc2"
3
+
s.version="0.2.0.rc3"
4
4
s.licenses=["Apache License (2.0)"]
5
5
s.summary="This plugin allows you to output to SQL, via JDBC"
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/plugin install gemname. This gem is not a stand-alone program"
0 commit comments