Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timezone parsing of logstash module ingest pipelines #13890

Merged
merged 2 commits into from
Oct 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Fixed early expiration of templates (Netflow v9 and IPFIX). {pull}13821[13821]
- Fixed bad handling of sequence numbers when multiple observation domains were exported by a single device (Netflow V9 and IPFIX). {pull}13821[13821]
- Fix conditions and error checking of date processors in ingest pipelines that use `event.timezone` to parse dates. {pull}13883[13883]
- Fix timezone parsing of logstash module ingest pipelines. {pull}13890[13890]

*Heartbeat*

Expand Down
12 changes: 6 additions & 6 deletions filebeat/module/logstash/log/ingest/pipeline-plain.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
},
{
"date": {
"if": "ctx.event.timezone == null",
"field": "logstash.log.timestamp",
"target_field": "@timestamp",
"formats": [
"ISO8601"
],
"ignore_failure": true
"formats": ["yyyy-MM-dd'T'HH:mm:ss,SSS"],
"on_failure": [{"append": {"field": "error.message", "value": "{{ _ingest.on_failure_message }}"}}]
}
},
{
"date": {
"if": "ctx.event.timezone != null",
"field": "@timestamp",
"formats": ["ISO8601"],
"field": "logstash.log.timestamp",
"target_field": "@timestamp",
"formats": ["yyyy-MM-dd'T'HH:mm:ss,SSS"],
"timezone": "{{ event.timezone }}",
"on_failure": [{"append": {"field": "error.message", "value": "{{ _ingest.on_failure_message }}"}}]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"@timestamp": "2017-10-23T12:20:12.046-02:00",
"@timestamp": "2017-10-23T14:20:12.046-02:00",
"event.dataset": "logstash.log",
"event.module": "logstash",
"event.timezone": "-02:00",
Expand All @@ -13,7 +13,7 @@
"service.type": "logstash"
},
{
"@timestamp": "2017-11-20T01:55:00.318-02:00",
"@timestamp": "2017-11-20T03:55:00.318-02:00",
"event.dataset": "logstash.log",
"event.module": "logstash",
"event.timezone": "-02:00",
Expand Down
12 changes: 6 additions & 6 deletions filebeat/module/logstash/slowlog/ingest/pipeline-plain.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@
},
{
"date": {
"if": "ctx.event.timezone == null",
"field": "logstash.slowlog.timestamp",
"target_field": "@timestamp",
"formats": [
"ISO8601"
],
"ignore_failure": true
"formats": ["yyyy-MM-dd'T'HH:mm:ss,SSS"],
"on_failure": [{"append": {"field": "error.message", "value": "{{ _ingest.on_failure_message }}"}}]
}
},
{
"date": {
"if": "ctx.event.timezone != null",
"field": "@timestamp",
"formats": ["ISO8601"],
"field": "logstash.slowlog.timestamp",
"target_field": "@timestamp",
"formats": ["yyyy-MM-dd'T'HH:mm:ss,SSS"],
"timezone": "{{ event.timezone }}",
"on_failure": [{"append": {"field": "error.message", "value": "{{ _ingest.on_failure_message }}"}}]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"@timestamp": "2017-10-30T07:57:58.243-02:00",
"@timestamp": "2017-10-30T09:57:58.243-02:00",
"event.dataset": "logstash.slowlog",
"event.duration": 3027675106,
"event.module": "logstash",
Expand Down