Skip to content

Commit

Permalink
Fix wrong migration alias for beat.name (#10070)
Browse files Browse the repository at this point in the history
beat.name had the value of hostname or manually assigned name. This is not agent.type but host.name. Change is applied to ecs-migration.yml and fields.common.yml.

Further changes:

* Remove double migration entry
* Move some fields out of fields.ecs.yml as not needed there anymore. Tests were improved.
  • Loading branch information
ruflin authored Jan 17, 2019
1 parent 9d33de0 commit d9f51db
Show file tree
Hide file tree
Showing 19 changed files with 163 additions and 166 deletions.
36 changes: 18 additions & 18 deletions auditbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2470,6 +2470,24 @@ type: keyword
Error type.
--
*`beat.name`*::
+
--
type: alias
alias to: host.name
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
[[exported-fields-cloud]]
Expand Down Expand Up @@ -5693,24 +5711,6 @@ example: 4.4.0-112-generic
Operating system kernel version as a raw string.
--
*`beat.name`*::
+
--
type: alias
alias to: agent.type
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
*`agent.hostname`*::
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/include/fields.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev-tools/ecs-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
alias: false

- from: beat.name
to: agent.type
to: host.name
alias6: true
alias: true

Expand Down
36 changes: 18 additions & 18 deletions filebeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,24 @@ type: keyword
Error type.
--
*`beat.name`*::
+
--
type: alias
alias to: host.name
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
[[exported-fields-cloud]]
Expand Down Expand Up @@ -3780,24 +3798,6 @@ example: 4.4.0-112-generic
Operating system kernel version as a raw string.
--
*`beat.name`*::
+
--
type: alias
alias to: agent.type
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
*`agent.hostname`*::
Expand Down
2 changes: 1 addition & 1 deletion filebeat/include/fields.go

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions heartbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ type: keyword
Error type.
--
*`beat.name`*::
+
--
type: alias
alias to: host.name
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
[[exported-fields-cloud]]
Expand Down Expand Up @@ -3297,24 +3315,6 @@ example: 4.4.0-112-generic
Operating system kernel version as a raw string.
--
*`beat.name`*::
+
--
type: alias
alias to: agent.type
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
*`agent.hostname`*::
Expand Down
2 changes: 1 addition & 1 deletion heartbeat/include/fields.go

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions journalbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ type: keyword
Error type.
--
*`beat.name`*::
+
--
type: alias
alias to: host.name
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
[[exported-fields-cloud]]
Expand Down Expand Up @@ -3574,24 +3592,6 @@ example: 4.4.0-112-generic
Operating system kernel version as a raw string.
--
*`beat.name`*::
+
--
type: alias
alias to: agent.type
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
*`agent.hostname`*::
Expand Down
2 changes: 1 addition & 1 deletion journalbeat/include/fields.go

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion libbeat/_meta/fields.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
fields:
- name: beat.timezone
type: alias
migration: true
path: event.timezone
migration: true

Expand All @@ -25,3 +24,13 @@
type: keyword
description: >
Error type.
- name: beat.name
type: alias
path: host.name
migration: true

- name: beat.hostname
type: alias
path: agent.hostname
migration: true
12 changes: 0 additions & 12 deletions libbeat/_meta/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2214,18 +2214,6 @@
description: >
Operating system kernel version as a raw string.
# Temporary fix to get 7.0 dashboards working.
# This must go in the ecs.yml as otherwise tests don't work.
- name: beat.name
type: alias
path: agent.type
migration: true

- name: beat.hostname
type: alias
path: agent.hostname
migration: true

# This is not in ECS.
# TODO: https://github.com/elastic/ecs/issues/178
- name: agent.hostname
Expand Down
36 changes: 18 additions & 18 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,24 @@ type: keyword
Error type.
--
*`beat.name`*::
+
--
type: alias
alias to: host.name
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
[[exported-fields-ceph]]
Expand Down Expand Up @@ -6431,24 +6449,6 @@ example: 4.4.0-112-generic
Operating system kernel version as a raw string.
--
*`beat.name`*::
+
--
type: alias
alias to: agent.type
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
*`agent.hostname`*::
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/include/fields/fields.go

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions packetbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,24 @@ type: keyword
Error type.
--
*`beat.name`*::
+
--
type: alias
alias to: host.name
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
[[exported-fields-cassandra]]
Expand Down Expand Up @@ -5189,24 +5207,6 @@ example: 4.4.0-112-generic
Operating system kernel version as a raw string.
--
*`beat.name`*::
+
--
type: alias
alias to: agent.type
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
*`agent.hostname`*::
Expand Down
2 changes: 1 addition & 1 deletion packetbeat/include/fields.go

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions winlogbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,24 @@ type: keyword
Error type.
--
*`beat.name`*::
+
--
type: alias
alias to: host.name
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
[[exported-fields-cloud]]
Expand Down Expand Up @@ -3206,24 +3224,6 @@ example: 4.4.0-112-generic
Operating system kernel version as a raw string.
--
*`beat.name`*::
+
--
type: alias
alias to: agent.type
--
*`beat.hostname`*::
+
--
type: alias
alias to: agent.hostname
--
*`agent.hostname`*::
Expand Down
Loading

0 comments on commit d9f51db

Please sign in to comment.