Hi,
I am using same index "index => "$logstash-%{+YYYY.MM.dd}"" for multiple configuration reading multiple logs so as to have one index for certain type of logs.
It only writes index in ElasticSearch for 1st configuration file which reads the logs and not for the other ones.
For example: I had an implementation with single configuration and index named "$logstash-%{+YYYY.MM.dd}"". Now I added another configuration to read other files and used same index "$logstash-%{+YYYY.MM.dd}"". In new configuration, filter generated more fields which didn't get updated in existing index of Elastic Search though it showed on stdout.
Output settings:
output {
elasticsearch {
hosts => ["ES01:9200"]
index => "$logstash-%{+YYYY.MM.dd}"
}
}
I saw two options to use doc_as_upsert => "true" and document_id field. I am not sure if document_id should be same in both configurations. please help.
How to upsert new fields so as same index works for multiple configuration (fields generated from filter)?