Hi, I'm configuring the ELK-docker for the first time and this is new to me.
I'm using,
- filebeat version 5.0
- elasticsearch version 5.0
- kibana version 5.0
I have filebeat configured on a different server and ELK-docker on a different server. The log files are stored on the same server the filebeat is configured. As a beginner I was trying to follow the shakespeare example provided here
My filebeat.yml looks like this.
filebeat.prospectors:
- input_type: log
paths:
- /opt/ALLMODULESLOG/*.log
output.elasticsearch:
hosts: ["10.44.2.48:9200"]
template:
name: "shakespeare"
path: "/etc/filebeat/filebeat.shakespeare.json"
overwrite: true
I have the log file inside '/opt/ALLMODULESLOG/' downloaded from here and I renamed it to 'shakespeare.log' (I renamed it because my other log files are in .log extension, I assume this won't make any issues)
My filebeat.shakespeare.json looks like this
{"mappings":{"_default_":{"_all":{"norms":{"enabled":false}},"_meta":{"version":"5.0.0"},"dynamic_templates":[{"strings_as_keyword":{"mapping":{"ignore_above":1024,"index":"not_analyzed","type":"string"},"match_mapping_type":"string"}}],"properties":{"speaker":{"type":"string","index":"not_analyzed"},"play_name":{"type":"string","index":"not_analyzed"},"line_id":{"type":"integer"},"speech_number":{"type":"integer"},"line_number":{"type":"integer"},"text_entry":{"type":"string","index":"not_analyzed"}}}},"order":0,"settings":{"index.refresh_interval":"5s"},"template":"shakespeare"}
Also I added the mapping by following command
curl -XPUT http://localhost:9200/shakespeare -d '
{
"mappings" : {
"_default_" : {
"properties" : {
"speaker" : {"type": "string", "index" : "not_analyzed" },
"play_name" : {"type": "string", "index" : "not_analyzed" },
"line_id" : { "type" : "integer" },
"speech_number" : { "type" : "integer" }
}
}
}
}
';
But when I added the index 'shakespeare' on kibana (Settings -> Indices) it shows the fields _source, _id, _type, _index, _score and not the speaker, play_name, line_id, speech_number fields. Please let me know if i'm missing anything? What is the configuration I need to do to forward and index the json formatted log files to elasticsearch?