logstash-filter-date 3.2.0 → 3.2.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 +4 -4
- data/CHANGELOG.md +3 -0
- data/docs/index.asciidoc +41 -42
- data/lib/logstash/filters/date.rb +51 -52
- data/logstash-filter-date.gemspec +1 -1
- data/spec/fixtures/old_date_filter.rb +38 -39
- data/vendor/jar-dependencies/org/logstash/filters/logstash-filter-date/3.1.6/logstash-filter-date-3.1.6.jar +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: acaae4f07bc5115a72912039e65d94e0036d7cb13eb426f5a6da08728db6e347
|
|
4
|
+
data.tar.gz: 5b52406d8576e434a23b4b7a9d30ce9ca4699e8ef16640151964067d7f799a58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c6ec611ae7343d02ca09326de16c80d39d6aace82bd7eb159a9ff9e33ff038915dad79cd58760ae83fdeb613e526636cb4274ff948ec8512c96374de43a0ded
|
|
7
|
+
data.tar.gz: b7c9daffcf5364c87f529b4c7e473b50a0b88498777ed33b95e5012cac7770bf33c2d71f4f34ac0d8d5266b126fabd7f7b9613d3cdbd24767799d18dc520535e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
## 3.2.1
|
|
2
|
+
- Fix date syntax docs list formatting [#166](https://github.com/logstash-plugins/logstash-filter-date/pull/166)
|
|
3
|
+
|
|
1
4
|
## 3.2.0
|
|
2
5
|
- Add `precision` setting to support nanosecond precision timestamps [#165](https://github.com/logstash-plugins/logstash-filter-date/pull/165)
|
|
3
6
|
- `ms` (default): timestamps are stored with millisecond precision
|
data/docs/index.asciidoc
CHANGED
|
@@ -111,61 +111,60 @@ indicate the form of that value (2-digit month, full month name, etc).
|
|
|
111
111
|
|
|
112
112
|
Here's what you can use to parse dates and times:
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
yy::: two-digit year. Example: `15` for the year 2015.
|
|
114
|
+
* `y`: year
|
|
115
|
+
** `yyyy`: full year number. Example: `2015`.
|
|
116
|
+
** `yy`: two-digit year. Example: `15` for the year 2015.
|
|
118
117
|
|
|
119
|
-
M
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
* `M`: month of the year
|
|
119
|
+
** `M`: minimal-digit month. Example: `1` for January and `12` for December.
|
|
120
|
+
** `MM`: two-digit month. zero-padded if needed. Example: `01` for January and `12` for December
|
|
121
|
+
** `MMM`: abbreviated month text. Example: `Jan` for January. Note: The language used depends on your locale. See the `locale` setting for how to change the language.
|
|
122
|
+
** `MMMM`: full month text, Example: `January`. Note: The language used depends on your locale.
|
|
124
123
|
|
|
125
|
-
d
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
* `d`: day of the month
|
|
125
|
+
** `d`: minimal-digit day. Example: `1` for the 1st of the month.
|
|
126
|
+
** `dd`: two-digit day, zero-padded if needed. Example: `01` for the 1st of the month.
|
|
128
127
|
|
|
129
|
-
H
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
* `H`: hour of the day (24-hour clock)
|
|
129
|
+
** `H`: minimal-digit hour. Example: `0` for midnight.
|
|
130
|
+
** `HH`: two-digit hour, zero-padded if needed. Example: `00` for midnight.
|
|
132
131
|
|
|
133
|
-
m
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
* `m`: minutes of the hour (60 minutes per hour)
|
|
133
|
+
** `m`: minimal-digit minutes. Example: `0`.
|
|
134
|
+
** `mm`: two-digit minutes, zero-padded if needed. Example: `00`.
|
|
136
135
|
|
|
137
|
-
s
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
* `s`: seconds of the minute (60 seconds per minute)
|
|
137
|
+
** `s`: minimal-digit seconds. Example: `0`.
|
|
138
|
+
** `ss`: two-digit seconds, zero-padded if needed. Example: `00`.
|
|
140
139
|
|
|
141
|
-
S
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
* `S`: fraction of a second
|
|
141
|
+
** `S`: tenths of a second. Example: `0` for a subsecond value `012`
|
|
142
|
+
** `SS`: hundredths of a second. Example: `01` for a subsecond value `01`
|
|
143
|
+
** `SSS`: milliseconds. Example: `012` for a subsecond value `012`
|
|
144
|
+
** `SSSSSS`: microseconds. Example: `012345`
|
|
145
|
+
** `SSSSSSSSS`: nanoseconds. Example: `012345678`
|
|
147
146
|
|
|
148
|
-
V
|
|
149
|
-
|
|
147
|
+
* `V`: time-zone ID
|
|
148
|
+
** `VV`: time zone ID. Example: `America/Los_Angeles`. Note: This is only supported by `java.time` parsing.
|
|
150
149
|
|
|
151
|
-
Z
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
* `Z`: time zone offset or identity
|
|
151
|
+
** `Z`: Timezone offset structured as HHmm (hour and minutes offset from Zulu/UTC). Example: `-0700`.
|
|
152
|
+
** `ZZ`: Timezone offset structured as HH:mm (colon in between hour and minute offsets). Example: `-07:00`.
|
|
153
|
+
** `ZZZ`: Timezone identity. Example: `America/Los_Angeles`. Note: Valid IDs are listed on the http://joda-time.sourceforge.net/timezones.html[Joda.org available time zones page].
|
|
155
154
|
|
|
156
|
-
z
|
|
155
|
+
* `z`: time zone names. *Time zone names (`z`) cannot be parsed.*
|
|
157
156
|
|
|
158
|
-
w
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
* `w`: week of the year
|
|
158
|
+
** `w`: minimal-digit week. Example: `1`.
|
|
159
|
+
** `ww`: two-digit week, zero-padded if needed. Example: `01`.
|
|
161
160
|
|
|
162
|
-
D
|
|
161
|
+
* `D`: day of the year
|
|
163
162
|
|
|
164
|
-
e
|
|
163
|
+
* `e`: day of the week (number)
|
|
165
164
|
|
|
166
|
-
E
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
* `E`: day of the week (text)
|
|
166
|
+
** `E`, `EE`, `EEE`: Abbreviated day of the week. Example: `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`. Note: The actual language of this will depend on your locale.
|
|
167
|
+
** `EEEE`: The full text day of the week. Example: `Monday`, `Tuesday`, ... Note: The actual language of this will depend on your locale.
|
|
169
168
|
|
|
170
169
|
For non-formatting syntax, you'll need to put single-quote characters around the value. For example, if you were parsing ISO8601 time, "2015-01-01T01:12:23" that little "T" isn't a valid time format, and you want to say "literally, a T", your format would be this: "yyyy-MM-dd'T'HH:mm:ss"
|
|
171
170
|
|
|
@@ -83,58 +83,57 @@ class LogStash::Filters::Date < LogStash::Filters::Base
|
|
|
83
83
|
#
|
|
84
84
|
# Here's what you can use to parse dates and times:
|
|
85
85
|
#
|
|
86
|
-
#
|
|
87
|
-
#
|
|
88
|
-
#
|
|
89
|
-
#
|
|
90
|
-
#
|
|
91
|
-
# M
|
|
92
|
-
#
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
#
|
|
97
|
-
# d
|
|
98
|
-
#
|
|
99
|
-
#
|
|
100
|
-
#
|
|
101
|
-
# H
|
|
102
|
-
#
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
# m
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
#
|
|
109
|
-
# s
|
|
110
|
-
#
|
|
111
|
-
#
|
|
112
|
-
#
|
|
113
|
-
# S
|
|
114
|
-
#
|
|
115
|
-
#
|
|
116
|
-
#
|
|
117
|
-
#
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
# Z
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
#
|
|
125
|
-
#
|
|
126
|
-
#
|
|
127
|
-
# w
|
|
128
|
-
#
|
|
129
|
-
#
|
|
130
|
-
#
|
|
131
|
-
#
|
|
132
|
-
#
|
|
133
|
-
#
|
|
134
|
-
#
|
|
135
|
-
# E
|
|
136
|
-
#
|
|
137
|
-
# EEEE::: The full text day of the week. Example: `Monday`, `Tuesday`, ... Note: The actual language of this will depend on your locale.
|
|
86
|
+
# * `y`: year
|
|
87
|
+
# ** `yyyy`: full year number. Example: `2015`.
|
|
88
|
+
# ** `yy`: two-digit year. Example: `15` for the year 2015.
|
|
89
|
+
#
|
|
90
|
+
# * `M`: month of the year
|
|
91
|
+
# ** `M`: minimal-digit month. Example: `1` for January and `12` for December.
|
|
92
|
+
# ** `MM`: two-digit month. zero-padded if needed. Example: `01` for January and `12` for December
|
|
93
|
+
# ** `MMM`: abbreviated month text. Example: `Jan` for January. Note: The language used depends on your locale. See the `locale` setting for how to change the language.
|
|
94
|
+
# ** `MMMM`: full month text, Example: `January`. Note: The language used depends on your locale.
|
|
95
|
+
#
|
|
96
|
+
# * `d`: day of the month
|
|
97
|
+
# ** `d`: minimal-digit day. Example: `1` for the 1st of the month.
|
|
98
|
+
# ** `dd`: two-digit day, zero-padded if needed. Example: `01` for the 1st of the month.
|
|
99
|
+
#
|
|
100
|
+
# * `H`: hour of the day (24-hour clock)
|
|
101
|
+
# ** `H`: minimal-digit hour. Example: `0` for midnight.
|
|
102
|
+
# ** `HH`: two-digit hour, zero-padded if needed. Example: `00` for midnight.
|
|
103
|
+
#
|
|
104
|
+
# * `m`: minutes of the hour (60 minutes per hour)
|
|
105
|
+
# ** `m`: minimal-digit minutes. Example: `0`.
|
|
106
|
+
# ** `mm`: two-digit minutes, zero-padded if needed. Example: `00`.
|
|
107
|
+
#
|
|
108
|
+
# * `s`: seconds of the minute (60 seconds per minute)
|
|
109
|
+
# ** `s`: minimal-digit seconds. Example: `0`.
|
|
110
|
+
# ** `ss`: two-digit seconds, zero-padded if needed. Example: `00`.
|
|
111
|
+
#
|
|
112
|
+
# * `S`: fraction of a second
|
|
113
|
+
# ** `S`: tenths of a second. Example: `0` for a subsecond value `012`
|
|
114
|
+
# ** `SS`: hundredths of a second. Example: `01` for a subsecond value `01`
|
|
115
|
+
# ** `SSS`: milliseconds. Example: `012` for a subsecond value `012`
|
|
116
|
+
# ** `SSSSSS`: microseconds.
|
|
117
|
+
# ** `SSSSSSSSS`: nanoseconds.
|
|
118
|
+
#
|
|
119
|
+
# * `Z`: time zone offset or identity
|
|
120
|
+
# ** `Z`: Timezone offset structured as HHmm (hour and minutes offset from Zulu/UTC). Example: `-0700`.
|
|
121
|
+
# ** `ZZ`: Timezone offset structured as HH:mm (colon in between hour and minute offsets). Example: `-07:00`.
|
|
122
|
+
# ** `ZZZ`: Timezone identity. Example: `America/Los_Angeles`. Note: Valid IDs are listed on the http://joda-time.sourceforge.net/timezones.html[Joda.org available time zones page].
|
|
123
|
+
#
|
|
124
|
+
# * `z`: time zone names. *Time zone names (`z`) cannot be parsed.*
|
|
125
|
+
#
|
|
126
|
+
# * `w`: week of the year
|
|
127
|
+
# ** `w`: minimal-digit week. Example: `1`.
|
|
128
|
+
# ** `ww`: two-digit week, zero-padded if needed. Example: `01`.
|
|
129
|
+
#
|
|
130
|
+
# * `D`: day of the year
|
|
131
|
+
#
|
|
132
|
+
# * `e`: day of the week (number)
|
|
133
|
+
#
|
|
134
|
+
# * `E`: day of the week (text)
|
|
135
|
+
# ** `E`, `EE`, `EEE`: Abbreviated day of the week. Example: `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`. Note: The actual language of this will depend on your locale.
|
|
136
|
+
# ** `EEEE`: The full text day of the week. Example: `Monday`, `Tuesday`, ... Note: The actual language of this will depend on your locale.
|
|
138
137
|
#
|
|
139
138
|
# For non-formatting syntax, you'll need to put single-quote characters around the value. For example, if you were parsing ISO8601 time, "2015-01-01T01:12:23" that little "T" isn't a valid time format, and you want to say "literally, a T", your format would be this: "yyyy-MM-dd'T'HH:mm:ss"
|
|
140
139
|
#
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
|
|
3
3
|
s.name = 'logstash-filter-date'
|
|
4
|
-
s.version = '3.2.
|
|
4
|
+
s.version = '3.2.1'
|
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
|
6
6
|
s.summary = "Parses dates from fields to use as the Logstash timestamp for an 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"
|
|
@@ -92,57 +92,56 @@ class LogStash::Filters::DateRuby < LogStash::Filters::Base
|
|
|
92
92
|
#
|
|
93
93
|
# Here's what you can use to parse dates and times:
|
|
94
94
|
#
|
|
95
|
-
#
|
|
96
|
-
#
|
|
97
|
-
#
|
|
98
|
-
# yy::: two-digit year. Example: `15` for the year 2015.
|
|
95
|
+
# * `y`: year
|
|
96
|
+
# ** `yyyy`: full year number. Example: `2015`.
|
|
97
|
+
# ** `yy`: two-digit year. Example: `15` for the year 2015.
|
|
99
98
|
#
|
|
100
|
-
# M
|
|
101
|
-
#
|
|
102
|
-
#
|
|
103
|
-
#
|
|
104
|
-
#
|
|
99
|
+
# * `M`: month of the year
|
|
100
|
+
# ** `M`: minimal-digit month. Example: `1` for January and `12` for December.
|
|
101
|
+
# ** `MM`: two-digit month. zero-padded if needed. Example: `01` for January and `12` for December
|
|
102
|
+
# ** `MMM`: abbreviated month text. Example: `Jan` for January. Note: The language used depends on your locale. See the `locale` setting for how to change the language.
|
|
103
|
+
# ** `MMMM`: full month text, Example: `January`. Note: The language used depends on your locale.
|
|
105
104
|
#
|
|
106
|
-
# d
|
|
107
|
-
#
|
|
108
|
-
#
|
|
105
|
+
# * `d`: day of the month
|
|
106
|
+
# ** `d`: minimal-digit day. Example: `1` for the 1st of the month.
|
|
107
|
+
# ** `dd`: two-digit day, zero-padded if needed. Example: `01` for the 1st of the month.
|
|
109
108
|
#
|
|
110
|
-
# H
|
|
111
|
-
#
|
|
112
|
-
#
|
|
109
|
+
# * `H`: hour of the day (24-hour clock)
|
|
110
|
+
# ** `H`: minimal-digit hour. Example: `0` for midnight.
|
|
111
|
+
# ** `HH`: two-digit hour, zero-padded if needed. Example: `00` for midnight.
|
|
113
112
|
#
|
|
114
|
-
# m
|
|
115
|
-
#
|
|
116
|
-
#
|
|
113
|
+
# * `m`: minutes of the hour (60 minutes per hour)
|
|
114
|
+
# ** `m`: minimal-digit minutes. Example: `0`.
|
|
115
|
+
# ** `mm`: two-digit minutes, zero-padded if needed. Example: `00`.
|
|
117
116
|
#
|
|
118
|
-
# s
|
|
119
|
-
#
|
|
120
|
-
#
|
|
117
|
+
# * `s`: seconds of the minute (60 seconds per minute)
|
|
118
|
+
# ** `s`: minimal-digit seconds. Example: `0`.
|
|
119
|
+
# ** `ss`: two-digit seconds, zero-padded if needed. Example: `00`.
|
|
121
120
|
#
|
|
122
|
-
# S
|
|
123
|
-
#
|
|
124
|
-
#
|
|
125
|
-
#
|
|
126
|
-
#
|
|
121
|
+
# * `S`: fraction of a second
|
|
122
|
+
# ** Maximum precision is milliseconds (`SSS`). Beyond that, zeroes are appended.
|
|
123
|
+
# ** `S`: tenths of a second. Example: `0` for a subsecond value `012`
|
|
124
|
+
# ** `SS`: hundredths of a second. Example: `01` for a subsecond value `01`
|
|
125
|
+
# ** `SSS`: thousandths of a second. Example: `012` for a subsecond value `012`
|
|
127
126
|
#
|
|
128
|
-
# Z
|
|
129
|
-
#
|
|
130
|
-
#
|
|
131
|
-
#
|
|
127
|
+
# * `Z`: time zone offset or identity
|
|
128
|
+
# ** `Z`: Timezone offset structured as HHmm (hour and minutes offset from Zulu/UTC). Example: `-0700`.
|
|
129
|
+
# ** `ZZ`: Timezone offset structured as HH:mm (colon in between hour and minute offsets). Example: `-07:00`.
|
|
130
|
+
# ** `ZZZ`: Timezone identity. Example: `America/Los_Angeles`. Note: Valid IDs are listed on the http://joda-time.sourceforge.net/timezones.html[Joda.org available time zones page].
|
|
132
131
|
#
|
|
133
|
-
# z
|
|
132
|
+
# * `z`: time zone names. *Time zone names (`z`) cannot be parsed.*
|
|
134
133
|
#
|
|
135
|
-
# w
|
|
136
|
-
#
|
|
137
|
-
#
|
|
134
|
+
# * `w`: week of the year
|
|
135
|
+
# ** `w`: minimal-digit week. Example: `1`.
|
|
136
|
+
# ** `ww`: two-digit week, zero-padded if needed. Example: `01`.
|
|
138
137
|
#
|
|
139
|
-
# D
|
|
138
|
+
# * `D`: day of the year
|
|
140
139
|
#
|
|
141
|
-
# e
|
|
140
|
+
# * `e`: day of the week (number)
|
|
142
141
|
#
|
|
143
|
-
# E
|
|
144
|
-
#
|
|
145
|
-
#
|
|
142
|
+
# * `E`: day of the week (text)
|
|
143
|
+
# ** `E`, `EE`, `EEE`: Abbreviated day of the week. Example: `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`. Note: The actual language of this will depend on your locale.
|
|
144
|
+
# ** `EEEE`: The full text day of the week. Example: `Monday`, `Tuesday`, ... Note: The actual language of this will depend on your locale.
|
|
146
145
|
#
|
|
147
146
|
# For non-formatting syntax, you'll need to put single-quote characters around the value. For example, if you were parsing ISO8601 time, "2015-01-01T01:12:23" that little "T" isn't a valid time format, and you want to say "literally, a T", your format would be this: "yyyy-MM-dd'T'HH:mm:ss"
|
|
148
147
|
#
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: logstash-filter-date
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
4
|
+
version: 3.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Elastic
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-05-07 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: logstash-core-plugin-api
|