[DOCS] Update ML tutorial with latest sample data (elastic/x-pack-elasticsearch#1258)
* [DOCS] Updated mappings in ML sample data * [DOCS] Update ML tutorial with latest sample data Original commit: elastic/x-pack-elasticsearch@37fd75aed5
This commit is contained in:
parent
c4be95ae31
commit
d77f20b14e
|
@ -143,23 +143,22 @@ Each document in the server-metrics data set has the following schema:
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
{
|
{
|
||||||
"index":
|
"index":
|
||||||
{
|
{
|
||||||
"_index":"server-metrics",
|
"_index":"server-metrics",
|
||||||
"_type":"metric",
|
"_type":"metric",
|
||||||
"_id":"AVuQL1eekrHQ5a9V5qre"
|
"_id":"1177"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
"deny":1783,
|
"@timestamp":"2017-03-23T13:00:00",
|
||||||
"service":"app_0",
|
"accept":36320,
|
||||||
"@timestamp":"2017-03-26T06:47:28.684926",
|
"deny":4156,
|
||||||
"accept":24465,
|
"host":"server_2",
|
||||||
"host":"server_1",
|
"response":2.4558210155,
|
||||||
"total":26248,
|
"service":"app_3",
|
||||||
"response":1.8242486553275024
|
"total":40476
|
||||||
}
|
}
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
|
@ -195,46 +194,33 @@ mapping for the data set:
|
||||||
|
|
||||||
curl -u elastic:changeme -X PUT -H 'Content-Type: application/json'
|
curl -u elastic:changeme -X PUT -H 'Content-Type: application/json'
|
||||||
http://localhost:9200/server-metrics -d '{
|
http://localhost:9200/server-metrics -d '{
|
||||||
"settings": {
|
"settings":{
|
||||||
"number_of_shards": 1,
|
"number_of_shards":1,
|
||||||
"number_of_replicas": 0
|
"number_of_replicas":0
|
||||||
},
|
},
|
||||||
"mappings": {
|
"mappings":{
|
||||||
"metric": {
|
"metric":{
|
||||||
"properties": {
|
"properties":{
|
||||||
"@timestamp": {
|
"@timestamp":{
|
||||||
"type": "date"
|
"type":"date"
|
||||||
},
|
},
|
||||||
"accept": {
|
"accept":{
|
||||||
"type": "long"
|
"type":"long"
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny":{
|
||||||
"type": "long"
|
"type":"long"
|
||||||
},
|
},
|
||||||
"host": {
|
"host":{
|
||||||
"type": "text",
|
"type":"keyword"
|
||||||
"fields": {
|
|
||||||
"keyword": {
|
|
||||||
"type": "keyword",
|
|
||||||
"ignore_above": 256
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"response": {
|
"response":{
|
||||||
"type": "float"
|
"type":"float"
|
||||||
},
|
},
|
||||||
"service": {
|
"service":{
|
||||||
"type": "text",
|
"type":"keyword"
|
||||||
"fields": {
|
|
||||||
"keyword": {
|
|
||||||
"type": "keyword",
|
|
||||||
"ignore_above": 256
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"total": {
|
"total":{
|
||||||
"type": "long"
|
"type":"long"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue