-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Better out-of-the-box mappings for logs, metrics and synthetics #64978
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
Changes from 21 commits
1100b95
dae84d6
90ca4b1
35d0727
ce72eef
2e130a5
7497f29
ce711a7
30e97b3
74cb397
67bed57
863bae7
5dc16be
9ea0a35
4707606
d6eb0af
4c04815
c9249b5
db58ab9
9950d8b
c4cb7fd
f7376e5
42c9f58
89eb06d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| { | ||
| "template": { | ||
| "mappings": { | ||
| "dynamic_templates": [ | ||
| { | ||
| "match_ip": { | ||
| "match_mapping_type": "string", | ||
| "match": "ip", | ||
| "mapping": { | ||
| "type": "ip" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "strings_as_keyword": { | ||
| "mapping": { | ||
| "ignore_above": 1024, | ||
| "type": "keyword" | ||
| }, | ||
| "match_mapping_type": "string" | ||
| } | ||
| } | ||
| ], | ||
| "date_detection": false, | ||
| "properties": { | ||
| "@timestamp": { | ||
| "type": "date" | ||
| }, | ||
| "data_stream": { | ||
| "properties": { | ||
| "dataset": { | ||
| "type": "constant_keyword" | ||
| }, | ||
| "namespace": { | ||
| "type": "constant_keyword" | ||
| } | ||
| } | ||
| }, | ||
| "ecs": { | ||
| "properties": { | ||
| "version": { | ||
| "ignore_above": 1024, | ||
| "type": "keyword" | ||
| } | ||
| } | ||
| }, | ||
| "host": { | ||
| "type": "object" | ||
| }, | ||
| "observer": { | ||
| "type": "object" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "_meta": { | ||
| "description": "general mapping conventions for data streams", | ||
| "managed": true | ||
| }, | ||
| "version": ${xpack.stack.template.version} | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,51 +3,23 @@ | |
| "mappings": { | ||
| "dynamic_templates": [ | ||
| { | ||
| "strings_as_keyword": { | ||
| "match_message": { | ||
| "match_mapping_type": "string", | ||
| "match": "message", | ||
| "mapping": { | ||
| "ignore_above": 1024, | ||
| "type": "keyword" | ||
| }, | ||
| "match_mapping_type": "string" | ||
| "type": "match_only_text" | ||
|
||
| } | ||
| } | ||
| } | ||
| ], | ||
| "date_detection": false, | ||
| "properties": { | ||
| "@timestamp": { | ||
| "type": "date" | ||
| }, | ||
| "data_stream": { | ||
| "properties": { | ||
| "type": { | ||
| "type": "constant_keyword", | ||
| "value": "logs" | ||
| }, | ||
| "dataset": { | ||
| "type": "constant_keyword" | ||
| }, | ||
| "namespace": { | ||
| "type": "constant_keyword" | ||
| } | ||
| } | ||
| }, | ||
| "ecs": { | ||
| "properties": { | ||
| "version": { | ||
| "ignore_above": 1024, | ||
| "type": "keyword" | ||
| } | ||
| } | ||
| }, | ||
| "host": { | ||
| "properties": { | ||
| "ip": { | ||
| "type": "ip" | ||
| } | ||
| } | ||
| }, | ||
| "message": { | ||
| "type": "text" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |||||||||||||
| "data_stream": {}, | ||||||||||||||
| "composed_of": [ | ||||||||||||||
| "logs-mappings", | ||||||||||||||
| "data-streams-mappings", | ||||||||||||||
| "logs-settings" | ||||||||||||||
|
Comment on lines
6
to
8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should apply the
Suggested change
What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually this would break tests because then the dynamic template that maps strings as keywords would take precedence over the dynamic template that maps message fields as |
||||||||||||||
| ], | ||||||||||||||
| "allow_auto_create": true, | ||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |||||||||
| "data_stream": {}, | ||||||||||
| "composed_of": [ | ||||||||||
| "metrics-mappings", | ||||||||||
| "data-streams-mappings", | ||||||||||
|
Comment on lines
6
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here with:
Suggested change
|
||||||||||
| "metrics-settings" | ||||||||||
| ], | ||||||||||
| "allow_auto_create": true, | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |||||||||
| "data_stream": {}, | ||||||||||
| "composed_of": [ | ||||||||||
| "synthetics-mappings", | ||||||||||
| "data-streams-mappings", | ||||||||||
|
Comment on lines
6
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And same here with:
Suggested change
|
||||||||||
| "synthetics-settings" | ||||||||||
| ], | ||||||||||
| "allow_auto_create": true, | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could leave this one out.