logstash-output-exec 3.1.0 → 3.1.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: 29fcfb399581aa75e8e3d73001763a92bf6f457a
4
- data.tar.gz: b9d8df492e0c01c14e8199b378938e052585b75f
3
+ metadata.gz: 878a5afa87427168d9349c5d012a8c36e12f6481
4
+ data.tar.gz: 2307b161995ac098f1cd39a37410cb7aef5981a9
5
5
  SHA512:
6
- metadata.gz: ad0d473dcd805260cfdf029bcb22284f112eb9674db15ce970614f0ab4379d9fdb7dbb3f9c2ad40023efe6df5794e29e905d8c52ebd0ece32fb58c765e40d275
7
- data.tar.gz: fddac5679e43d4dc3fffa405f30237c2a2a34e7267209d0ca9abf1a139f874dffa2dca0a76e135b9292a71f8ffc457ad678d5d106d66e102aeef0587990c46f7
6
+ metadata.gz: 523bf56aad6e7fb6ce2744572c6687bae3fff9ba4808f5a2716aeecdc201aa177e9597844dbeb59549d08eb177c42ea406e206f11da3fd8e0d2aa2531df0913b
7
+ data.tar.gz: 7c87c1afed14a970954e6a78ae30741cc172b5eb79ba1dd9379b089f70e7ea258cd5cf222903c1d0ba8b3ae537de23ff0acb05c6f866b8625a1e4e4e6b917197
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,86 @@
1
+ :plugin: exec
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
+ === Exec output plugin
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+ The exec output will run a command for each event received. Ruby's
24
+ `system()` function will be used, i.e. the command string will
25
+ be passed to a shell. You can use `%{name}` and other dynamic strings
26
+ in the command to pass select fields from the event to the child
27
+ process. Example:
28
+ [source,ruby]
29
+ output {
30
+ if [type] == "abuse" {
31
+ exec {
32
+ command => "iptables -A INPUT -s %{clientip} -j DROP"
33
+ }
34
+ }
35
+ }
36
+
37
+ WARNING: If you want it non-blocking you should use `&` or `dtach`
38
+ or other such techniques. There is no timeout for the commands being
39
+ run so misbehaving commands could otherwise stall the Logstash
40
+ pipeline indefinitely.
41
+
42
+ WARNING: Exercise great caution with `%{name}` field placeholders.
43
+ The contents of the field will be included verbatim without any
44
+ sanitization, i.e. any shell metacharacters from the field values
45
+ will be passed straight to the shell.
46
+
47
+ [id="plugins-{type}s-{plugin}-options"]
48
+ ==== Exec Output Configuration Options
49
+
50
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
51
+
52
+ [cols="<,<,<",options="header",]
53
+ |=======================================================================
54
+ |Setting |Input type|Required
55
+ | <<plugins-{type}s-{plugin}-command>> |<<string,string>>|Yes
56
+ | <<plugins-{type}s-{plugin}-quiet>> |<<boolean,boolean>>|No
57
+ |=======================================================================
58
+
59
+ Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
60
+ output plugins.
61
+
62
+ &nbsp;
63
+
64
+ [id="plugins-{type}s-{plugin}-command"]
65
+ ===== `command`
66
+
67
+ * This is a required setting.
68
+ * Value type is <<string,string>>
69
+ * There is no default value for this setting.
70
+
71
+ Command line to execute via subprocess. Use `dtach` or `screen` to
72
+ make it non blocking. This value can include `%{name}` and other
73
+ dynamic strings.
74
+
75
+ [id="plugins-{type}s-{plugin}-quiet"]
76
+ ===== `quiet`
77
+
78
+ * Value type is <<boolean,boolean>>
79
+ * Default value is `false`
80
+
81
+ display the result of the command to the terminal
82
+
83
+
84
+
85
+ [id="plugins-{type}s-{plugin}-common-options"]
86
+ include::{include_path}/{type}.asciidoc[]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-exec'
3
- s.version = '3.1.0'
3
+ s.version = '3.1.1'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "This output will run a command for any matching event."
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/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.require_paths = ["lib"]
11
11
 
12
12
  # Files
13
- s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
13
+ s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
14
14
 
15
15
  # Tests
16
16
  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-exec
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.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-12-06 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
@@ -70,6 +70,7 @@ files:
70
70
  - LICENSE
71
71
  - NOTICE.TXT
72
72
  - README.md
73
+ - docs/index.asciidoc
73
74
  - lib/logstash/outputs/exec.rb
74
75
  - logstash-output-exec.gemspec
75
76
  - spec/outputs/exec_spec.rb