logstash-output-csv 3.0.3 → 3.0.4

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: cf27eb2bd2a2c7f319206b2551e773db1b1384fa
4
- data.tar.gz: b39854c4fb69d80283c5948dd51b8e024403995c
3
+ metadata.gz: 1383b217b90791fecbff26c7dc354ee59dd5cbfc
4
+ data.tar.gz: f627906184033e7e110dcdfe6e8eacfe0f3524bb
5
5
  SHA512:
6
- metadata.gz: abfe83405456fb2f8104ba51c3728c3548db5707971009d4490f5c6276158c934d995350723e3a63465e7379ac421db2106fce3906a37d0cb8c6de282e0e0909
7
- data.tar.gz: 7e8a4ff31b01e17edfe7dfcbfef730898e293fd8cc2bae3c2d9a1ec2c5002dd0037bdd59f74b63fb769cc0f9a41986b19c6ba9ca5ec5573a8003e9f6ffe3fd51
6
+ metadata.gz: 00d9b949660281296cd9e1c632f1bfbb56a33a4f154e30e1d27e9e2312f8e06ee65fbf89de12bf73720fd00c17888782f943af11f7bc6f2904d41929dcd8bde3
7
+ data.tar.gz: 94ec80dfcbeacfecb7a82f1477c20331b533760c29d502fd47936643f58180c497682a7559770bdbc8cd251ea553034656faf0b8e365de277cd5b55860da18e4
data/Gemfile CHANGED
@@ -1,4 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in logstash-mass_effect.gemspec
4
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,175 @@
1
+ :plugin: csv
2
+ :type: output
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 output plugin
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+ CSV output.
24
+
25
+ Write events to disk in CSV or other delimited format
26
+ Based on the file output, many config values are shared
27
+ Uses the Ruby csv library internally
28
+
29
+ [id="plugins-{type}s-{plugin}-options"]
30
+ ==== Csv Output Configuration Options
31
+
32
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
33
+
34
+ [cols="<,<,<",options="header",]
35
+ |=======================================================================
36
+ |Setting |Input type|Required
37
+ | <<plugins-{type}s-{plugin}-create_if_deleted>> |<<boolean,boolean>>|No
38
+ | <<plugins-{type}s-{plugin}-csv_options>> |<<hash,hash>>|No
39
+ | <<plugins-{type}s-{plugin}-dir_mode>> |<<number,number>>|No
40
+ | <<plugins-{type}s-{plugin}-fields>> |<<array,array>>|Yes
41
+ | <<plugins-{type}s-{plugin}-file_mode>> |<<number,number>>|No
42
+ | <<plugins-{type}s-{plugin}-filename_failure>> |<<string,string>>|No
43
+ | <<plugins-{type}s-{plugin}-flush_interval>> |<<number,number>>|No
44
+ | <<plugins-{type}s-{plugin}-gzip>> |<<boolean,boolean>>|No
45
+ | <<plugins-{type}s-{plugin}-path>> |<<string,string>>|Yes
46
+ | <<plugins-{type}s-{plugin}-spreadsheet_safe>> |<<boolean,boolean>>|No
47
+ |=======================================================================
48
+
49
+ Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
50
+ output plugins.
51
+
52
+ &nbsp;
53
+
54
+ [id="plugins-{type}s-{plugin}-create_if_deleted"]
55
+ ===== `create_if_deleted`
56
+
57
+ * Value type is <<boolean,boolean>>
58
+ * Default value is `true`
59
+
60
+ If the configured file is deleted, but an event is handled by the plugin,
61
+ the plugin will recreate the file. Default => true
62
+
63
+ [id="plugins-{type}s-{plugin}-csv_options"]
64
+ ===== `csv_options`
65
+
66
+ * Value type is <<hash,hash>>
67
+ * Default value is `{}`
68
+
69
+ Options for CSV output. This is passed directly to the Ruby stdlib to_csv function.
70
+ Full documentation is available on the http://ruby-doc.org/stdlib-2.0.0/libdoc/csv/rdoc/index.html[Ruby CSV documentation page].
71
+ A typical use case would be to use alternative column or row seperators eg: `csv_options => {"col_sep" => "\t" "row_sep" => "\r\n"}` gives tab seperated data with windows line endings
72
+
73
+ [id="plugins-{type}s-{plugin}-dir_mode"]
74
+ ===== `dir_mode`
75
+
76
+ * Value type is <<number,number>>
77
+ * Default value is `-1`
78
+
79
+ Dir access mode to use. Note that due to the bug in jruby system umask
80
+ is ignored on linux: https://github.com/jruby/jruby/issues/3426
81
+ Setting it to -1 uses default OS value.
82
+ Example: `"dir_mode" => 0750`
83
+
84
+ [id="plugins-{type}s-{plugin}-fields"]
85
+ ===== `fields`
86
+
87
+ * This is a required setting.
88
+ * Value type is <<array,array>>
89
+ * There is no default value for this setting.
90
+
91
+ The field names from the event that should be written to the CSV file.
92
+ Fields are written to the CSV in the same order as the array.
93
+ If a field does not exist on the event, an empty string will be written.
94
+ Supports field reference syntax eg: `fields => ["field1", "[nested][field]"]`.
95
+
96
+ [id="plugins-{type}s-{plugin}-file_mode"]
97
+ ===== `file_mode`
98
+
99
+ * Value type is <<number,number>>
100
+ * Default value is `-1`
101
+
102
+ File access mode to use. Note that due to the bug in jruby system umask
103
+ is ignored on linux: https://github.com/jruby/jruby/issues/3426
104
+ Setting it to -1 uses default OS value.
105
+ Example: `"file_mode" => 0640`
106
+
107
+ [id="plugins-{type}s-{plugin}-filename_failure"]
108
+ ===== `filename_failure`
109
+
110
+ * Value type is <<string,string>>
111
+ * Default value is `"_filepath_failures"`
112
+
113
+ If the generated path is invalid, the events will be saved
114
+ into this file and inside the defined path.
115
+
116
+ [id="plugins-{type}s-{plugin}-flush_interval"]
117
+ ===== `flush_interval`
118
+
119
+ * Value type is <<number,number>>
120
+ * Default value is `2`
121
+
122
+ Flush interval (in seconds) for flushing writes to log files.
123
+ 0 will flush on every message.
124
+
125
+ [id="plugins-{type}s-{plugin}-gzip"]
126
+ ===== `gzip`
127
+
128
+ * Value type is <<boolean,boolean>>
129
+ * Default value is `false`
130
+
131
+ Gzip the output stream before writing to disk.
132
+
133
+ [id="plugins-{type}s-{plugin}-path"]
134
+ ===== `path`
135
+
136
+ * This is a required setting.
137
+ * Value type is <<string,string>>
138
+ * There is no default value for this setting.
139
+
140
+ This output writes events to files on disk. You can use fields
141
+ from the event as parts of the filename and/or path.
142
+
143
+ By default, this output writes one event per line in **json** format.
144
+ You can customise the line format using the `line` codec like
145
+ [source,ruby]
146
+ output {
147
+ file {
148
+ path => ...
149
+ codec => line { format => "custom format: %{message}"}
150
+ }
151
+ }
152
+ The path to the file to write. Event fields can be used here,
153
+ like `/var/log/logstash/%{host}/%{application}`
154
+ One may also utilize the path option for date-based log
155
+ rotation via the joda time format. This will use the event
156
+ timestamp.
157
+ E.g.: `path => "./test-%{+YYYY-MM-dd}.txt"` to create
158
+ `./test-2013-05-29.txt`
159
+
160
+ If you use an absolute path you cannot start with a dynamic string.
161
+ E.g: `/%{myfield}/`, `/test-%{myfield}/` are not valid paths
162
+
163
+ [id="plugins-{type}s-{plugin}-spreadsheet_safe"]
164
+ ===== `spreadsheet_safe`
165
+
166
+ * Value type is <<boolean,boolean>>
167
+ * Default value is `true`
168
+
169
+ Option to not escape/munge string values. Please note turning off this option
170
+ may not make the values safe in your spreadsheet application
171
+
172
+
173
+
174
+ [id="plugins-{type}s-{plugin}-common-options"]
175
+ include::{include_path}/{type}.asciidoc[]
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-csv'
4
- s.version = '3.0.3'
4
+ s.version = '3.0.4'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Write events to disk in CSV or other delimited format"
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-output-csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-20 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/outputs/csv.rb
102
103
  - logstash-output-csv.gemspec
103
104
  - spec/outputs/csv_spec.rb