logstash-input-gelf 3.0.2 → 3.0.4
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile +8 -1
- data/docs/index.asciidoc +105 -0
- data/lib/logstash/inputs/gelf.rb +2 -2
- data/logstash-input-gelf.gemspec +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3815773b0e5e5d3fc957e5f8c883b4e2d8ce31e
|
4
|
+
data.tar.gz: d3f5373c5fe714040a4e612b652ea1b0cf65e088
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c895c6d5eca4ab32a0cbd7c3c49ca78b8271cd063a7ca629c3e8e65f903bb174fce9e520b55be3bd43f32f746872f9683dfe3f3d849edbc3b71e6d5dae789759
|
7
|
+
data.tar.gz: bfbd7588a98b2f00d5d7a4de3454ec40f0c8588735bdc6c515e170a1dd749164c864b0204c7f2f8b67c41c1ebdfa8e2a2ac8d7a927df55f12649096413b608b9
|
data/CHANGELOG.md
CHANGED
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
|
data/docs/index.asciidoc
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
:plugin: gelf
|
2
|
+
:type: input
|
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
|
+
=== Gelf input plugin
|
18
|
+
|
19
|
+
include::{include_path}/plugin_header.asciidoc[]
|
20
|
+
|
21
|
+
==== Description
|
22
|
+
|
23
|
+
This input will read GELF messages as events over the network,
|
24
|
+
making it a good choice if you already use Graylog2 today.
|
25
|
+
|
26
|
+
The main use case for this input is to leverage existing GELF
|
27
|
+
logging libraries such as the GELF log4j appender. A library used
|
28
|
+
by this plugin has a bug which prevents it parsing uncompressed data.
|
29
|
+
If you use the log4j appender you need to configure it like this to force
|
30
|
+
gzip even for small messages:
|
31
|
+
|
32
|
+
<Socket name="logstash" protocol="udp" host="logstash.example.com" port="5001">
|
33
|
+
<GelfLayout compressionType="GZIP" compressionThreshold="1" />
|
34
|
+
</Socket>
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
[id="plugins-{type}s-{plugin}-options"]
|
39
|
+
==== Gelf Input Configuration Options
|
40
|
+
|
41
|
+
This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
|
42
|
+
|
43
|
+
[cols="<,<,<",options="header",]
|
44
|
+
|=======================================================================
|
45
|
+
|Setting |Input type|Required
|
46
|
+
| <<plugins-{type}s-{plugin}-host>> |<<string,string>>|No
|
47
|
+
| <<plugins-{type}s-{plugin}-port>> |<<number,number>>|No
|
48
|
+
| <<plugins-{type}s-{plugin}-remap>> |<<boolean,boolean>>|No
|
49
|
+
| <<plugins-{type}s-{plugin}-strip_leading_underscore>> |<<boolean,boolean>>|No
|
50
|
+
|=======================================================================
|
51
|
+
|
52
|
+
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
53
|
+
input plugins.
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
[id="plugins-{type}s-{plugin}-host"]
|
58
|
+
===== `host`
|
59
|
+
|
60
|
+
* Value type is <<string,string>>
|
61
|
+
* Default value is `"0.0.0.0"`
|
62
|
+
|
63
|
+
The IP address or hostname to listen on.
|
64
|
+
|
65
|
+
[id="plugins-{type}s-{plugin}-port"]
|
66
|
+
===== `port`
|
67
|
+
|
68
|
+
* Value type is <<number,number>>
|
69
|
+
* Default value is `12201`
|
70
|
+
|
71
|
+
The port to listen on. Remember that ports less than 1024 (privileged
|
72
|
+
ports) may require root to use.
|
73
|
+
|
74
|
+
[id="plugins-{type}s-{plugin}-remap"]
|
75
|
+
===== `remap`
|
76
|
+
|
77
|
+
* Value type is <<boolean,boolean>>
|
78
|
+
* Default value is `true`
|
79
|
+
|
80
|
+
Whether or not to remap the GELF message fields to Logstash event fields or
|
81
|
+
leave them intact.
|
82
|
+
|
83
|
+
Remapping converts the following GELF fields to Logstash equivalents:
|
84
|
+
|
85
|
+
* `full\_message` becomes `event.get("message")`.
|
86
|
+
* if there is no `full\_message`, `short\_message` becomes `event.get("message")`.
|
87
|
+
|
88
|
+
[id="plugins-{type}s-{plugin}-strip_leading_underscore"]
|
89
|
+
===== `strip_leading_underscore`
|
90
|
+
|
91
|
+
* Value type is <<boolean,boolean>>
|
92
|
+
* Default value is `true`
|
93
|
+
|
94
|
+
Whether or not to remove the leading `\_` in GELF fields or leave them
|
95
|
+
in place. (Logstash < 1.2 did not remove them by default.). Note that
|
96
|
+
GELF version 1.1 format now requires all non-standard fields to be added
|
97
|
+
as an "additional" field, beginning with an underscore.
|
98
|
+
|
99
|
+
e.g. `\_foo` becomes `foo`
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
[id="plugins-{type}s-{plugin}-common-options"]
|
105
|
+
include::{include_path}/{type}.asciidoc[]
|
data/lib/logstash/inputs/gelf.rb
CHANGED
@@ -38,8 +38,8 @@ class LogStash::Inputs::Gelf < LogStash::Inputs::Base
|
|
38
38
|
#
|
39
39
|
# Remapping converts the following GELF fields to Logstash equivalents:
|
40
40
|
#
|
41
|
-
# * `full\_message` becomes `event
|
42
|
-
# * if there is no `full\_message`, `short\_message` becomes `event
|
41
|
+
# * `full\_message` becomes `event.get("message")`.
|
42
|
+
# * if there is no `full\_message`, `short\_message` becomes `event.get("message")`.
|
43
43
|
config :remap, :validate => :boolean, :default => true
|
44
44
|
|
45
45
|
# Whether or not to remove the leading `\_` in GELF fields or leave them
|
data/logstash-input-gelf.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-gelf'
|
4
|
-
s.version = '3.0.
|
4
|
+
s.version = '3.0.4'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "This input will read GELF messages as events over the network, making it a good choice if you already use Graylog2 today."
|
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[
|
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-input-gelf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
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:
|
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
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- LICENSE
|
127
127
|
- NOTICE.TXT
|
128
128
|
- README.md
|
129
|
+
- docs/index.asciidoc
|
129
130
|
- lib/logstash/inputs/gelf.rb
|
130
131
|
- logstash-input-gelf.gemspec
|
131
132
|
- spec/inputs/gelf_spec.rb
|
@@ -152,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
153
|
version: '0'
|
153
154
|
requirements: []
|
154
155
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.4.8
|
156
157
|
signing_key:
|
157
158
|
specification_version: 4
|
158
159
|
summary: This input will read GELF messages as events over the network, making it a good choice if you already use Graylog2 today.
|