Skip to content

Commit

Permalink
Rename beat.timezone to event.timezone in add_locale processor (#9458)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruflin committed Dec 13, 2018
1 parent 7dfcade commit 4f0a65f
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha1...master[Check the HEAD d

- Update add_cloud_metadata fields to adjust to ECS. {pull}9265[9265]
- Automaticall cap signed integers to 63bits. {pull}8991[8991]
- Rename beat.timezone to event.timezone. {pull}9458[9458]

*Auditbeat*

Expand Down
3 changes: 2 additions & 1 deletion auditbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2446,8 +2446,9 @@ Contains common beat fields available in all event types.
*`beat.timezone`*::
+
--
The timezone as returned by the operating system on which the Beat is running.
type: alias
alias to: event.timezone
--
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/include/fields.go

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions dev-tools/ecs-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
alias6: true
alias: true

- from: beat.timezone
to: event.timezone
alias6: true
alias: true

# Filebeat modules

## Suricata module
Expand Down
3 changes: 2 additions & 1 deletion filebeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,9 @@ Contains common beat fields available in all event types.
*`beat.timezone`*::
+
--
The timezone as returned by the operating system on which the Beat is running.
type: alias
alias to: event.timezone
--
Expand Down
2 changes: 1 addition & 1 deletion filebeat/include/fields.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion heartbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Contains common beat fields available in all event types.
*`beat.timezone`*::
+
--
The timezone as returned by the operating system on which the Beat is running.
type: alias
alias to: event.timezone
--
Expand Down
2 changes: 1 addition & 1 deletion heartbeat/include/fields.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion journalbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ Contains common beat fields available in all event types.
*`beat.timezone`*::
+
--
The timezone as returned by the operating system on which the Beat is running.
type: alias
alias to: event.timezone
--
Expand Down
2 changes: 1 addition & 1 deletion journalbeat/include/fields.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions libbeat/_meta/fields.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
Contains common beat fields available in all event types.
fields:
- name: beat.timezone
description: >
The timezone as returned by the operating system on which the Beat is
running.
type: alias
migration: true
path: event.timezone

- name: "@timestamp"
type: date
Expand Down
2 changes: 1 addition & 1 deletion libbeat/processors/add_locale/add_locale.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func newAddLocale(c *common.Config) (processors.Processor, error) {
func (l addLocale) Run(event *beat.Event) (*beat.Event, error) {
zone, offset := time.Now().Zone()
format := l.Format(zone, offset)
event.PutValue("beat.timezone", format)
event.PutValue("event.timezone", format)
return event, nil
}

Expand Down
2 changes: 1 addition & 1 deletion libbeat/processors/add_locale/add_locale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestExportTimezone(t *testing.T) {
actual := getActualValue(t, testConfig, input)

expected := common.MapStr{
"beat": map[string]string{
"event": map[string]string{
"timezone": zone,
},
}
Expand Down
3 changes: 2 additions & 1 deletion metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,9 @@ Contains common beat fields available in all event types.
*`beat.timezone`*::
+
--
The timezone as returned by the operating system on which the Beat is running.
type: alias
alias to: event.timezone
--
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/include/fields/fields.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion packetbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,9 @@ Contains common beat fields available in all event types.
*`beat.timezone`*::
+
--
The timezone as returned by the operating system on which the Beat is running.
type: alias
alias to: event.timezone
--
Expand Down
2 changes: 1 addition & 1 deletion packetbeat/include/fields.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion winlogbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ Contains common beat fields available in all event types.
*`beat.timezone`*::
+
--
The timezone as returned by the operating system on which the Beat is running.
type: alias
alias to: event.timezone
--
Expand Down
2 changes: 1 addition & 1 deletion winlogbeat/include/fields.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion x-pack/functionbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ Contains common beat fields available in all event types.
*`beat.timezone`*::
+
--
The timezone as returned by the operating system on which the Beat is running.
type: alias
alias to: event.timezone
--
Expand Down
2 changes: 1 addition & 1 deletion x-pack/functionbeat/include/fields.go

Large diffs are not rendered by default.

0 comments on commit 4f0a65f

Please sign in to comment.