Skip to content

Commit

Permalink
[ML] Sample data modules - use event.dataset instead of index name (#…
Browse files Browse the repository at this point in the history
…68538)

This PR adds event.dataset to the Kibana ecommerce sample data and makes the ML modules for ecommerce and weblog sample data use event.dataset to recognize the modules and also as the corresponding datafeed query instead of looking for the index name.
  • Loading branch information
pheyos authored Jun 9, 2020
1 parent 0b3391a commit 004df98
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 7 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,11 @@ export const fieldMappings = {
city_name: { type: 'keyword' },
},
},
event: {
properties: {
dataset: {
type: 'keyword',
},
},
},
};

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"defaultIndexPattern": "kibana_sample_data_ecommerce",
"query": {
"bool": {
"filter": [{ "term": { "_index": "kibana_sample_data_ecommerce" } }]
"filter": [{ "term": { "event.dataset": "sample_ecommerce" } }]
}
},
"jobs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"indices": ["INDEX_PATTERN_NAME"],
"query": {
"bool": {
"filter": [{ "term": { "_index": "kibana_sample_data_ecommerce" } }]
"filter": [{ "term": { "event.dataset": "sample_ecommerce" } }]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"defaultIndexPattern": "kibana_sample_data_logs",
"query": {
"bool": {
"filter": [{ "term": { "_index": "kibana_sample_data_logs" } }]
"filter": [{ "term": { "event.dataset": "sample_web_logs" } }]
}
},
"jobs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"indices": ["INDEX_PATTERN_NAME"],
"query": {
"bool": {
"filter": [{ "term": { "_index": "kibana_sample_data_logs" } }]
"filter": [{ "term": { "event.dataset": "sample_web_logs" } }]
}
},
"aggregations": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"indices": ["INDEX_PATTERN_NAME"],
"query": {
"bool": {
"filter": [{ "term": { "_index": "kibana_sample_data_logs" } }]
"filter": [{ "term": { "event.dataset": "sample_web_logs" } }]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"indices": ["INDEX_PATTERN_NAME"],
"query": {
"bool": {
"filter": [{ "term": { "_index": "kibana_sample_data_logs" } }]
"filter": [{ "term": { "event.dataset": "sample_web_logs" } }]
}
}
}

0 comments on commit 004df98

Please sign in to comment.