logstash-codec-csv 0.1.2 → 0.1.3
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 +5 -5
- data/Gemfile +9 -0
- data/README.md +6 -1
- data/docs/index.asciidoc +132 -0
- data/logstash-codec-csv.gemspec +3 -3
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b7cb465338d604e826b68fedac7cc5d0d480c1e2f1d1ba6a03c5ab649b237bc8
|
|
4
|
+
data.tar.gz: 4c22457edf2cda054e31e048a2736c583c8ab1c881672acc641e600c374a2aaf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f43f24282d31ddf8ba59e888c9cb3a5136efaa0444a0a6094f9aeb9f41bc6b9c39714b05f910e6eb0e4360fb603a4362fbef7729df441a0bd1f60189fef8c962
|
|
7
|
+
data.tar.gz: 8ce58d07603ae05dbdeb385b7563367760a9375f6c44cd9bec6583ee0948e61fe87f9d49819652113375db52a30468560c38fa224a516df3590e542995dabeec
|
data/Gemfile
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
|
+
|
|
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
|
data/README.md
CHANGED
|
@@ -82,7 +82,12 @@ gem build logstash-filter-awesome.gemspec
|
|
|
82
82
|
```
|
|
83
83
|
- Install the plugin from the Logstash home
|
|
84
84
|
```sh
|
|
85
|
-
|
|
85
|
+
# Logstash 2.3 and higher
|
|
86
|
+
bin/logstash-plugin install --no-verify
|
|
87
|
+
|
|
88
|
+
# Prior to Logstash 2.3
|
|
89
|
+
bin/plugin install --no-verify
|
|
90
|
+
|
|
86
91
|
```
|
|
87
92
|
- Start Logstash and proceed to test the plugin
|
|
88
93
|
|
data/docs/index.asciidoc
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
:plugin: csv
|
|
2
|
+
:type: codec
|
|
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
|
+
=== Csv codec plugin
|
|
18
|
+
|
|
19
|
+
include::{include_path}/plugin_header.asciidoc[]
|
|
20
|
+
|
|
21
|
+
==== Description
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
[id="plugins-{type}s-{plugin}-options"]
|
|
26
|
+
==== Csv Codec Configuration Options
|
|
27
|
+
|
|
28
|
+
[cols="<,<,<",options="header",]
|
|
29
|
+
|=======================================================================
|
|
30
|
+
|Setting |Input type|Required
|
|
31
|
+
| <<plugins-{type}s-{plugin}-autogenerate_column_names>> |<<boolean,boolean>>|No
|
|
32
|
+
| <<plugins-{type}s-{plugin}-charset>> |<<string,string>>, one of `["ASCII-8BIT", "UTF-8", "US-ASCII", "Big5", "Big5-HKSCS", "Big5-UAO", "CP949", "Emacs-Mule", "EUC-JP", "EUC-KR", "EUC-TW", "GB2312", "GB18030", "GBK", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-11", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "ISO-8859-16", "KOI8-R", "KOI8-U", "Shift_JIS", "UTF-16BE", "UTF-16LE", "UTF-32BE", "UTF-32LE", "Windows-31J", "Windows-1250", "Windows-1251", "Windows-1252", "IBM437", "IBM737", "IBM775", "CP850", "IBM852", "CP852", "IBM855", "CP855", "IBM857", "IBM860", "IBM861", "IBM862", "IBM863", "IBM864", "IBM865", "IBM866", "IBM869", "Windows-1258", "GB1988", "macCentEuro", "macCroatian", "macCyrillic", "macGreek", "macIceland", "macRoman", "macRomania", "macThai", "macTurkish", "macUkraine", "CP950", "CP951", "IBM037", "stateless-ISO-2022-JP", "eucJP-ms", "CP51932", "EUC-JIS-2004", "GB12345", "ISO-2022-JP", "ISO-2022-JP-2", "CP50220", "CP50221", "Windows-1256", "Windows-1253", "Windows-1255", "Windows-1254", "TIS-620", "Windows-874", "Windows-1257", "MacJapanese", "UTF-7", "UTF8-MAC", "UTF-16", "UTF-32", "UTF8-DoCoMo", "SJIS-DoCoMo", "UTF8-KDDI", "SJIS-KDDI", "ISO-2022-JP-KDDI", "stateless-ISO-2022-JP-KDDI", "UTF8-SoftBank", "SJIS-SoftBank", "BINARY", "CP437", "CP737", "CP775", "IBM850", "CP857", "CP860", "CP861", "CP862", "CP863", "CP864", "CP865", "CP866", "CP869", "CP1258", "Big5-HKSCS:2008", "ebcdic-cp-us", "eucJP", "euc-jp-ms", "EUC-JISX0213", "eucKR", "eucTW", "EUC-CN", "eucCN", "CP936", "ISO2022-JP", "ISO2022-JP2", "ISO8859-1", "ISO8859-2", "ISO8859-3", "ISO8859-4", "ISO8859-5", "ISO8859-6", "CP1256", "ISO8859-7", "CP1253", "ISO8859-8", "CP1255", "ISO8859-9", "CP1254", "ISO8859-10", "ISO8859-11", "CP874", "ISO8859-13", "CP1257", "ISO8859-14", "ISO8859-15", "ISO8859-16", "CP878", "MacJapan", "ASCII", "ANSI_X3.4-1968", "646", "CP65000", "CP65001", "UTF-8-MAC", "UTF-8-HFS", "UCS-2BE", "UCS-4BE", "UCS-4LE", "CP932", "csWindows31J", "SJIS", "PCK", "CP1250", "CP1251", "CP1252", "external", "locale"]`|No
|
|
33
|
+
| <<plugins-{type}s-{plugin}-columns>> |<<array,array>>|No
|
|
34
|
+
| <<plugins-{type}s-{plugin}-convert>> |<<hash,hash>>|No
|
|
35
|
+
| <<plugins-{type}s-{plugin}-include_headers>> |<<boolean,boolean>>|No
|
|
36
|
+
| <<plugins-{type}s-{plugin}-quote_char>> |<<string,string>>|No
|
|
37
|
+
| <<plugins-{type}s-{plugin}-separator>> |<<string,string>>|No
|
|
38
|
+
| <<plugins-{type}s-{plugin}-skip_empty_columns>> |<<boolean,boolean>>|No
|
|
39
|
+
|=======================================================================
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
[id="plugins-{type}s-{plugin}-autogenerate_column_names"]
|
|
44
|
+
===== `autogenerate_column_names`
|
|
45
|
+
|
|
46
|
+
* Value type is <<boolean,boolean>>
|
|
47
|
+
* Default value is `true`
|
|
48
|
+
|
|
49
|
+
Define whether column names should autogenerated or not.
|
|
50
|
+
Defaults to true. If set to false, columns not having a header specified will not be parsed.
|
|
51
|
+
|
|
52
|
+
[id="plugins-{type}s-{plugin}-charset"]
|
|
53
|
+
===== `charset`
|
|
54
|
+
|
|
55
|
+
* Value can be any of: `ASCII-8BIT`, `UTF-8`, `US-ASCII`, `Big5`, `Big5-HKSCS`, `Big5-UAO`, `CP949`, `Emacs-Mule`, `EUC-JP`, `EUC-KR`, `EUC-TW`, `GB2312`, `GB18030`, `GBK`, `ISO-8859-1`, `ISO-8859-2`, `ISO-8859-3`, `ISO-8859-4`, `ISO-8859-5`, `ISO-8859-6`, `ISO-8859-7`, `ISO-8859-8`, `ISO-8859-9`, `ISO-8859-10`, `ISO-8859-11`, `ISO-8859-13`, `ISO-8859-14`, `ISO-8859-15`, `ISO-8859-16`, `KOI8-R`, `KOI8-U`, `Shift_JIS`, `UTF-16BE`, `UTF-16LE`, `UTF-32BE`, `UTF-32LE`, `Windows-31J`, `Windows-1250`, `Windows-1251`, `Windows-1252`, `IBM437`, `IBM737`, `IBM775`, `CP850`, `IBM852`, `CP852`, `IBM855`, `CP855`, `IBM857`, `IBM860`, `IBM861`, `IBM862`, `IBM863`, `IBM864`, `IBM865`, `IBM866`, `IBM869`, `Windows-1258`, `GB1988`, `macCentEuro`, `macCroatian`, `macCyrillic`, `macGreek`, `macIceland`, `macRoman`, `macRomania`, `macThai`, `macTurkish`, `macUkraine`, `CP950`, `CP951`, `IBM037`, `stateless-ISO-2022-JP`, `eucJP-ms`, `CP51932`, `EUC-JIS-2004`, `GB12345`, `ISO-2022-JP`, `ISO-2022-JP-2`, `CP50220`, `CP50221`, `Windows-1256`, `Windows-1253`, `Windows-1255`, `Windows-1254`, `TIS-620`, `Windows-874`, `Windows-1257`, `MacJapanese`, `UTF-7`, `UTF8-MAC`, `UTF-16`, `UTF-32`, `UTF8-DoCoMo`, `SJIS-DoCoMo`, `UTF8-KDDI`, `SJIS-KDDI`, `ISO-2022-JP-KDDI`, `stateless-ISO-2022-JP-KDDI`, `UTF8-SoftBank`, `SJIS-SoftBank`, `BINARY`, `CP437`, `CP737`, `CP775`, `IBM850`, `CP857`, `CP860`, `CP861`, `CP862`, `CP863`, `CP864`, `CP865`, `CP866`, `CP869`, `CP1258`, `Big5-HKSCS:2008`, `ebcdic-cp-us`, `eucJP`, `euc-jp-ms`, `EUC-JISX0213`, `eucKR`, `eucTW`, `EUC-CN`, `eucCN`, `CP936`, `ISO2022-JP`, `ISO2022-JP2`, `ISO8859-1`, `ISO8859-2`, `ISO8859-3`, `ISO8859-4`, `ISO8859-5`, `ISO8859-6`, `CP1256`, `ISO8859-7`, `CP1253`, `ISO8859-8`, `CP1255`, `ISO8859-9`, `CP1254`, `ISO8859-10`, `ISO8859-11`, `CP874`, `ISO8859-13`, `CP1257`, `ISO8859-14`, `ISO8859-15`, `ISO8859-16`, `CP878`, `MacJapan`, `ASCII`, `ANSI_X3.4-1968`, `646`, `CP65000`, `CP65001`, `UTF-8-MAC`, `UTF-8-HFS`, `UCS-2BE`, `UCS-4BE`, `UCS-4LE`, `CP932`, `csWindows31J`, `SJIS`, `PCK`, `CP1250`, `CP1251`, `CP1252`, `external`, `locale`
|
|
56
|
+
* Default value is `"UTF-8"`
|
|
57
|
+
|
|
58
|
+
List of valid conversion types used for the convert option
|
|
59
|
+
The character encoding used in this codec. Examples include "UTF-8" and
|
|
60
|
+
"CP1252".
|
|
61
|
+
|
|
62
|
+
[id="plugins-{type}s-{plugin}-columns"]
|
|
63
|
+
===== `columns`
|
|
64
|
+
|
|
65
|
+
* Value type is <<array,array>>
|
|
66
|
+
* Default value is `[]`
|
|
67
|
+
|
|
68
|
+
Define a list of column names (in the order they appear in the CSV,
|
|
69
|
+
as if it were a header line). If `columns` is not configured, or there
|
|
70
|
+
are not enough columns specified, the default column names are
|
|
71
|
+
"column1", "column2", etc. In the case that there are more columns
|
|
72
|
+
in the data than specified in this column list, extra columns will be auto-numbered:
|
|
73
|
+
(e.g. "user_defined_1", "user_defined_2", "column3", "column4", etc.)
|
|
74
|
+
|
|
75
|
+
[id="plugins-{type}s-{plugin}-convert"]
|
|
76
|
+
===== `convert`
|
|
77
|
+
|
|
78
|
+
* Value type is <<hash,hash>>
|
|
79
|
+
* Default value is `{}`
|
|
80
|
+
|
|
81
|
+
Define a set of datatype conversions to be applied to columns.
|
|
82
|
+
Possible conversions are integer, float, date, date_time, boolean
|
|
83
|
+
|
|
84
|
+
# Example:
|
|
85
|
+
[source,ruby]
|
|
86
|
+
filter {
|
|
87
|
+
csv {
|
|
88
|
+
convert => { "column1" => "integer", "column2" => "boolean" }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[id="plugins-{type}s-{plugin}-include_headers"]
|
|
93
|
+
===== `include_headers`
|
|
94
|
+
|
|
95
|
+
* Value type is <<boolean,boolean>>
|
|
96
|
+
* Default value is `false`
|
|
97
|
+
|
|
98
|
+
Treats the first line received as the hearder information, this information will
|
|
99
|
+
be used to compose the field names in the generated events. Note this information can
|
|
100
|
+
be reset on demand, useful for example when dealing with new files in the file input
|
|
101
|
+
or new request in the http_poller. Default => false
|
|
102
|
+
|
|
103
|
+
[id="plugins-{type}s-{plugin}-quote_char"]
|
|
104
|
+
===== `quote_char`
|
|
105
|
+
|
|
106
|
+
* Value type is <<string,string>>
|
|
107
|
+
* Default value is `"\""`
|
|
108
|
+
|
|
109
|
+
Define the character used to quote CSV fields. If this is not specified
|
|
110
|
+
the default is a double quote `"`.
|
|
111
|
+
Optional.
|
|
112
|
+
|
|
113
|
+
[id="plugins-{type}s-{plugin}-separator"]
|
|
114
|
+
===== `separator`
|
|
115
|
+
|
|
116
|
+
* Value type is <<string,string>>
|
|
117
|
+
* Default value is `","`
|
|
118
|
+
|
|
119
|
+
Define the column separator value. If this is not specified, the default
|
|
120
|
+
is a comma `,`.
|
|
121
|
+
Optional.
|
|
122
|
+
|
|
123
|
+
[id="plugins-{type}s-{plugin}-skip_empty_columns"]
|
|
124
|
+
===== `skip_empty_columns`
|
|
125
|
+
|
|
126
|
+
* Value type is <<boolean,boolean>>
|
|
127
|
+
* Default value is `false`
|
|
128
|
+
|
|
129
|
+
Define whether empty columns should be skipped.
|
|
130
|
+
Defaults to false. If set to true, columns containing no value will not get set.
|
|
131
|
+
|
|
132
|
+
|
data/logstash-codec-csv.gemspec
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
|
|
3
3
|
s.name = 'logstash-codec-csv'
|
|
4
|
-
s.version = '0.1.
|
|
4
|
+
s.version = '0.1.3'
|
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
|
6
6
|
s.summary = "The csv codec take CSV data, parses it and passes it away"
|
|
7
|
-
s.description = "This gem is a
|
|
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"
|
|
8
8
|
s.authors = ["Elasticsearch"]
|
|
9
9
|
s.email = 'info@elasticsearch.com'
|
|
10
10
|
s.homepage = "http://www.elasticsearch.org/guide/en/logstash/current/index.html"
|
|
11
11
|
s.require_paths = ["lib"]
|
|
12
12
|
|
|
13
13
|
# Files
|
|
14
|
-
s.files = Dir[
|
|
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-codec-csv
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Elasticsearch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
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
|
|
@@ -38,7 +38,9 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
-
description: This gem is a
|
|
41
|
+
description: This gem is a Logstash plugin required to be installed on top of the
|
|
42
|
+
Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
|
|
43
|
+
gem is not a stand-alone program
|
|
42
44
|
email: info@elasticsearch.com
|
|
43
45
|
executables: []
|
|
44
46
|
extensions: []
|
|
@@ -49,6 +51,7 @@ files:
|
|
|
49
51
|
- Gemfile
|
|
50
52
|
- LICENSE
|
|
51
53
|
- README.md
|
|
54
|
+
- docs/index.asciidoc
|
|
52
55
|
- lib/logstash/codecs/csv.rb
|
|
53
56
|
- logstash-codec-csv.gemspec
|
|
54
57
|
- spec/codecs/csv_spec.rb
|
|
@@ -74,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
74
77
|
version: '0'
|
|
75
78
|
requirements: []
|
|
76
79
|
rubyforge_project:
|
|
77
|
-
rubygems_version: 2.
|
|
80
|
+
rubygems_version: 2.6.11
|
|
78
81
|
signing_key:
|
|
79
82
|
specification_version: 4
|
|
80
83
|
summary: The csv codec take CSV data, parses it and passes it away
|