Hello. I have a logstash configuration with a custom template. The template appears when I ask for it: "GET /_template/*". I followed this example: Logstash mapping
If I send the data to a file with json format this is what I get:
{
"@version": "1",
"@timestamp": "2016-07-12T22:35:03.423Z",
"date": "20160704",
"time": "105522.383935",
"thread": "13340",
"uuid": "18d1ccf3-9d2d-4602-bdb7-52a84351a57d",
"resource_id_module": "S2",
"method": "tryDeliver",
"file": "XMLdispatcher.cpp.532",
"severity": "info",
"interpreter": "InterpreterTimestamp",
"execute_time": "0",
"id_log": "sigas-control.log",
"received_from": "zero"
}
My template looks like this:
{
"template" : "sigas-control.log",
"settings" : { "index.refresh_interval" : "60s" },
"mappings" : {
"_default_" : {
"_all" : { "enabled" : false },
"dynamic_templates" : [{
"message_field" : {
"match" : "message",
"match_mapping_type" : "string",
"mapping" : { "type" : "string", "index" : "not_analyzed" }
}
}, {
"string_fields" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : { "type" : "string", "index" : "not_analyzed" }
}
}],
"properties" : {
"@timestamp" : { "type" : "date", "format" : "dateOptionalTime" },
"@version" : { "type" : "integer", "index" : "not_analyzed" },
"thread": { "type" : "integer", "index" : "not_analyzed" },
"uuid": { "type" : "string", "index" : "not_analyzed" },
"resource_id_module": { "type" : "string", "index" : "not_analyzed" },
"file": { "type" : "string", "index" : "not_analyzed" },
"severity": { "type" : "string", "index" : "not_analyzed" },
"log_message": { "type" : "string", "index" : "not_analyzed" },
"interpreter": { "type" : "string", "index" : "not_analyzed" },
"execute_time": { "type" : "integer", "index" : "not_analyzed" },
"date": { "type" : "date", "format" : "yyyyMMdd"},
"time": { "type" : "date", "format" : "HHmmss" },
"id_log" : { "type" : "string", "index" : "not_analyzed" },
"received_from" : { "type" : "string", "index" : "not_analyzed" }
}
}
}
}
What is that I'm doing wrong?