Skip to content

Commit

Permalink
elastic_agent - Add path_unmatch to filebeat_input metrics mappings
Browse files Browse the repository at this point in the history
Explicitly specify not to match `*.histogram.*` paths.

Fixes elastic/beats#35933
  • Loading branch information
andrewkroh committed Jul 28, 2023
1 parent 7935dee commit 94e2b54
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,6 @@
object_type: double
object_type_mapping_type: "*"
description: Map all fields with `path_match:``*.histogram.*` to `double`
- name: '*_total'
type: object
object_type: long
object_type_mapping_type: "*"
description: Map all fields with `path_match:``*_total` to `long`
- name: '*_gauge'
type: object
object_type: long
object_type_mapping_type: "*"
description: Map all fields with `path_match:``*_gauge` to `long`
- name: '*_length'
type: object
object_type: long
object_type_mapping_type: "*"
description: Map all fields with `path_match:``*_length` to `long`
# CEL specific fields
- name: resource
type: keyword
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,23 @@ elasticsearch:
index_template:
mappings:
dynamic: true
# Use this instead of fields.yml so that path_unmatch can be used.
dynamic_templates:
- filebeat_input.*_gauge:
path_match: filebeat_input.*_gauge
path_unmatch: '*.histogram.*'
mapping:
type: long
match_mapping_type: '*'
- filebeat_input.*_length:
path_match: filebeat_input.*_length
path_unmatch: '*.histogram.*'
mapping:
type: long
match_mapping_type: '*'
- filebeat_input.*_total:
path_match: filebeat_input.*_total
path_unmatch: '*.histogram.*'
mapping:
type: long
match_mapping_type: '*'

0 comments on commit 94e2b54

Please sign in to comment.