logstash-filter-grok 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/logstash-filter-grok.gemspec +4 -4
- data/spec/filters/grok_spec.rb +62 -0
- metadata +22 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f88ce234ed639c0da01571812b00fc9543a8772
|
4
|
+
data.tar.gz: 2a069fa37ca5bcffee14c6349d7882b24290128f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df2a9ecc781c10ffa3332359c6814ebb7ddb6639c8615fd9aefbd391f000fd35746c7fcd5d72a2bacb40042d3db3a6443a9354cb613c9ba44fcbfec3b40ee37b
|
7
|
+
data.tar.gz: 9dcda55048faf8df0d3a53bf491b553af7c3e232071eb36a02c9eee12e9378ccd74a00da6aaced7895f5d780e61782dd393ed6816097ac61b1523abe83c63491
|
data/LICENSE
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-grok'
|
4
|
-
s.version = '0.1.
|
4
|
+
s.version = '0.1.9'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Parse arbitrary text and structure it."
|
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/plugin install gemname. This gem is not a stand-alone program"
|
8
|
-
s.authors = ["
|
9
|
-
s.email = 'info@
|
10
|
-
s.homepage = "http://www.
|
8
|
+
s.authors = ["Elastic"]
|
9
|
+
s.email = 'info@elastic.co'
|
10
|
+
s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
|
11
11
|
s.require_paths = ["lib"]
|
12
12
|
|
13
13
|
# Files
|
data/spec/filters/grok_spec.rb
CHANGED
@@ -702,4 +702,66 @@ describe LogStash::Filters::Grok do
|
|
702
702
|
end
|
703
703
|
end
|
704
704
|
|
705
|
+
describe "grok with nil coerced value" do
|
706
|
+
config <<-CONFIG
|
707
|
+
filter {
|
708
|
+
grok {
|
709
|
+
match => { "message" => "test (N/A|%{BASE10NUM:duration:float}ms)" }
|
710
|
+
}
|
711
|
+
}
|
712
|
+
CONFIG
|
713
|
+
|
714
|
+
sample "test 28.4ms" do
|
715
|
+
insist { subject["duration"] } == 28.4
|
716
|
+
insist { subject["tags"] }.nil?
|
717
|
+
end
|
718
|
+
|
719
|
+
sample "test N/A" do
|
720
|
+
insist { insist { subject.to_hash }.include?("duration") }.fails
|
721
|
+
insist { subject["tags"] }.nil?
|
722
|
+
end
|
723
|
+
|
724
|
+
sample "test abc" do
|
725
|
+
insist { subject["duration"] }.nil?
|
726
|
+
insist { subject["tags"] } == ["_grokparsefailure"]
|
727
|
+
end
|
728
|
+
end
|
729
|
+
|
730
|
+
describe "grok with nil coerced value and keep_empty_captures" do
|
731
|
+
config <<-CONFIG
|
732
|
+
filter {
|
733
|
+
grok {
|
734
|
+
match => { "message" => "test (N/A|%{BASE10NUM:duration:float}ms)" }
|
735
|
+
keep_empty_captures => true
|
736
|
+
}
|
737
|
+
}
|
738
|
+
CONFIG
|
739
|
+
|
740
|
+
sample "test N/A" do
|
741
|
+
insist { subject.to_hash }.include?("duration")
|
742
|
+
insist { subject["tags"] }.nil?
|
743
|
+
end
|
744
|
+
|
745
|
+
end
|
746
|
+
|
747
|
+
describe "grok with no coercion" do
|
748
|
+
config <<-CONFIG
|
749
|
+
filter {
|
750
|
+
grok {
|
751
|
+
match => { "message" => "test (N/A|%{BASE10NUM:duration}ms)" }
|
752
|
+
}
|
753
|
+
}
|
754
|
+
CONFIG
|
755
|
+
|
756
|
+
sample "test 28.4ms" do
|
757
|
+
insist { subject["duration"] } == "28.4"
|
758
|
+
insist { subject["tags"] }.nil?
|
759
|
+
end
|
760
|
+
|
761
|
+
sample "test N/A" do
|
762
|
+
insist { subject["duration"] }.nil?
|
763
|
+
insist { subject["tags"] }.nil?
|
764
|
+
end
|
765
|
+
end
|
766
|
+
|
705
767
|
end
|
metadata
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-grok
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
|
15
|
-
version_requirements: !ruby/object:Gem::Requirement
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - '>='
|
18
17
|
- !ruby/object:Gem::Version
|
@@ -20,7 +19,10 @@ dependencies:
|
|
20
19
|
- - <
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 2.0.0
|
23
|
-
|
22
|
+
name: logstash-core
|
23
|
+
prerelease: false
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
26
|
requirements:
|
25
27
|
- - '>='
|
26
28
|
- !ruby/object:Gem::Version
|
@@ -28,52 +30,50 @@ dependencies:
|
|
28
30
|
- - <
|
29
31
|
- !ruby/object:Gem::Version
|
30
32
|
version: 2.0.0
|
31
|
-
prerelease: false
|
32
|
-
type: :runtime
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name: jls-grok
|
35
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ~>
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 0.11.1
|
40
34
|
requirement: !ruby/object:Gem::Requirement
|
41
35
|
requirements:
|
42
36
|
- - ~>
|
43
37
|
- !ruby/object:Gem::Version
|
44
38
|
version: 0.11.1
|
39
|
+
name: jls-grok
|
45
40
|
prerelease: false
|
46
41
|
type: :runtime
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: logstash-patterns-core
|
49
42
|
version_requirements: !ruby/object:Gem::Requirement
|
50
43
|
requirements:
|
51
|
-
- -
|
44
|
+
- - ~>
|
52
45
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
46
|
+
version: 0.11.1
|
47
|
+
- !ruby/object:Gem::Dependency
|
54
48
|
requirement: !ruby/object:Gem::Requirement
|
55
49
|
requirements:
|
56
50
|
- - '>='
|
57
51
|
- !ruby/object:Gem::Version
|
58
52
|
version: '0'
|
53
|
+
name: logstash-patterns-core
|
59
54
|
prerelease: false
|
60
55
|
type: :runtime
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: logstash-devutils
|
63
56
|
version_requirements: !ruby/object:Gem::Requirement
|
64
57
|
requirements:
|
65
58
|
- - '>='
|
66
59
|
- !ruby/object:Gem::Version
|
67
60
|
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
68
62
|
requirement: !ruby/object:Gem::Requirement
|
69
63
|
requirements:
|
70
64
|
- - '>='
|
71
65
|
- !ruby/object:Gem::Version
|
72
66
|
version: '0'
|
67
|
+
name: logstash-devutils
|
73
68
|
prerelease: false
|
74
69
|
type: :development
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
75
|
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
|
76
|
-
email: info@
|
76
|
+
email: info@elastic.co
|
77
77
|
executables: []
|
78
78
|
extensions: []
|
79
79
|
extra_rdoc_files: []
|
@@ -87,7 +87,7 @@ files:
|
|
87
87
|
- lib/logstash/filters/grok.rb
|
88
88
|
- logstash-filter-grok.gemspec
|
89
89
|
- spec/filters/grok_spec.rb
|
90
|
-
homepage: http://www.
|
90
|
+
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
91
91
|
licenses:
|
92
92
|
- Apache License (2.0)
|
93
93
|
metadata:
|