YuWatanabe
(Yu Watanabe)
September 2, 2016, 10:54am
1
I understand that elasticsearch automatically creates mapping definition when it is not preconfigured.
https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html#index-creation
For example below field is automatically created when I insert data from logstash.
"src_ip": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
Is there a way to check the default dynamic mapping template?
johtani
(Jun Ohtani)
September 2, 2016, 11:18am
2
Logstash register the template to Elasticsearch by this name.
You can see the template using _template
API
YuWatanabe
(Yu Watanabe)
September 12, 2016, 12:48pm
3
Hi Ohtani-san.
Thank you for the reply.
Is this still the case when the index name does not match the logstash- ?
I have stored log using filebeat through logstash and index name is filebeat-2016.09.12 and some fields includes multi fields. I did not manually import any json setting packaged inside filebeat.
I use filebeat 1.3.0 -1 and logstash 5.0.0 alpha 5 .
{
"filebeat-2016.09.12": {
"mappings": {
"log": {
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"beat": {
"properties": {
"hostname": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"count": {
"type": "long"
},
"host": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"input_type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"message": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"offset": {
"type": "long"
},
"source": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"tags": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}