Hi, I am new to ELK. Trying to parse the date inside the multiline messages as timestamp. Let me know what config file to be used

Unable to create index in ES from logstash

output {
stdout { codec => rubydebug }
elasticsearch {
hosts => ["127.0.0.1:9200"]
index => "MyLog-%{+YYYY.MM.dd}"
}
}

Please let me know what am I missing.