logstash-filter-date 3.1.1 → 3.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23dc096d2329e51dc294d33a1e13c0d160c26270
|
4
|
+
data.tar.gz: 7ab94137df21d9bf1e66f2befca1308ecbf5af99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df6a4a6db839b1472e9580848246a17e89196256edfea9123f07fb05be252eb0033dab2e71a757e9d46da77c7eea3609c1413fc46cc2e8c9778e3814e346f3fb
|
7
|
+
data.tar.gz: ca7e797bd82d5f13458d94ecbce72822f2ee2303cd7a55241fd84b79538d009b249069a180651e61be83bf9ceb8d61b79b96ffa875722330f9178ecbe125a168
|
data/CHANGELOG.md
CHANGED
@@ -49,8 +49,8 @@ class LogStash::Filters::Date < LogStash::Filters::Base
|
|
49
49
|
#
|
50
50
|
# If your time field has multiple possible formats, you can do this:
|
51
51
|
# [source,ruby]
|
52
|
-
# match => [ "logdate", "MMM dd
|
53
|
-
# "MMM d
|
52
|
+
# match => [ "logdate", "MMM dd yyyy HH:mm:ss",
|
53
|
+
# "MMM d yyyy HH:mm:ss", "ISO8601" ]
|
54
54
|
#
|
55
55
|
# The above will match a syslog (rfc3164) or `iso8601` timestamp.
|
56
56
|
#
|
@@ -68,7 +68,7 @@ class LogStash::Filters::Date < LogStash::Filters::Base
|
|
68
68
|
# [source,ruby]
|
69
69
|
# filter {
|
70
70
|
# date {
|
71
|
-
# match => [ "logdate", "MMM dd
|
71
|
+
# match => [ "logdate", "MMM dd yyyy HH:mm:ss" ]
|
72
72
|
# }
|
73
73
|
# }
|
74
74
|
#
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-date'
|
4
|
-
s.version = '3.1.
|
4
|
+
s.version = '3.1.3'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "The date filter is used for parsing dates from fields, and then using that date or timestamp as the logstash timestamp for the event."
|
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"
|
data/spec/filters/date_spec.rb
CHANGED
@@ -166,6 +166,15 @@ RUBY_ENGINE == "jruby" and describe LogStash::Filters::Date do
|
|
166
166
|
insist { subject.get("mydate") } == "%{bad_value}"
|
167
167
|
insist { subject.get("@timestamp") } != Time.iso8601("1970-01-01T00:00:00.000Z").utc
|
168
168
|
end
|
169
|
+
|
170
|
+
# Regression test
|
171
|
+
# Support numeric values that come through the JSON parser. These numbers appear as BigDecimal
|
172
|
+
# instead of Float.
|
173
|
+
sample(LogStash::Json.load('{ "mydate": 1350414944.123456 }')) do
|
174
|
+
insist { subject.get("mydate") } == 1350414944.123456
|
175
|
+
p subject.to_hash
|
176
|
+
insist { subject.get("@timestamp").time } == Time.iso8601("2012-10-16T12:15:44.123-07:00").utc
|
177
|
+
end
|
169
178
|
end
|
170
179
|
|
171
180
|
describe "parsing with UNIX_MS" do
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-date
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
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-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|