Skip to content

Commit

Permalink
Update ingest pipelines to use event.timezone (elastic#11248)
Browse files Browse the repository at this point in the history
* Update ingest pipelines to use event.timezone

Previously, `beats.timezone` was used, in master it's not available
anymore. However, some ingest pipelines were still using it.

(cherry picked from commit 1946505)
  • Loading branch information
adriansr committed Mar 14, 2019
1 parent 7a21bcb commit 6739b6f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions filebeat/fileset/fileset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ func TestGetPipelineConvertTS(t *testing.T) {
marshaled, err := json.Marshal(pipeline.contents)
require.NoError(t, err)
if cfg.Timezone {
assert.Contains(t, string(marshaled), "beat.timezone")
assert.Contains(t, string(marshaled), "event.timezone")
} else {
assert.NotContains(t, string(marshaled), "beat.timezone")
assert.NotContains(t, string(marshaled), "event.timezone")
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion filebeat/module/kafka/log/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"field": "kafka.log.timestamp",
"target_field": "@timestamp",
"formats": ["yyyy-MM-dd HH:mm:ss,SSS"],
{< if .convert_timezone >}"timezone": "{{ beat.timezone }}",{< end >}
{< if .convert_timezone >}"timezone": "{{ event.timezone }}",{< end >}
"ignore_failure": true
}
},
Expand Down
2 changes: 1 addition & 1 deletion filebeat/module/system/auth/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"MMM d HH:mm:ss",
"MMM dd HH:mm:ss"
],
{< if .convert_timezone >}"timezone": "{{ beat.timezone }}",{< end >}
{< if .convert_timezone >}"timezone": "{{ event.timezone }}",{< end >}
"ignore_failure": true
}
},
Expand Down
2 changes: 1 addition & 1 deletion filebeat/module/system/syslog/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"MMM dd HH:mm:ss",
"yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZ"
],
{< if .convert_timezone >}"timezone": "{{ beat.timezone }}",{< end >}
{< if .convert_timezone >}"timezone": "{{ event.timezone }}",{< end >}
"ignore_failure": true
}
},
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/module/iptables/log/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"date": {
"field": "iptables.raw_date",
"ignore_failure": true,
{< if .convert_timezone >}"timezone": "{{ beat.timezone }}",{< end >}
{< if .convert_timezone >}"timezone": "{{ event.timezone }}",{< end >}
"formats": [
"MMM d HH:mm:ss",
"MMM dd HH:mm:ss"
Expand Down

0 comments on commit 6739b6f

Please sign in to comment.