Hi Leandrojmp
Thanks again for your help.
But something is still missing for me (
My config
filter {
.....
....
........
mutate {
lowercase => [ "[Properties][app]" ]
}
}
output {
elasticsearch {
hosts => [**********]
user => "*****"
password => "********"
index => "%{[Properties][app]}-%{+YYYY.MM.dd}"
template_name => "lsnext-ft"
}
}
I also commented on the template (template_name), but the same thing.
This field Properties.app goes nested by JSON.
Always throws errors.
.
.
.
[2022-10-17T22:31:53,725][ERROR][logstash.outputs.elasticsearch][lsn-ft] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"%{[Properties][app]}-2022.10.17", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x28886b95>], :response=>{"index"=>{"_index"=>"%{[Properties][app]}-2022.10.17", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"invalid_index_name_exception", "reason"=>"Invalid index name [%{[Properties][app]}-2022.10.17], must be lowercase", "index_uuid"=>"_na_", "index"=>"%{[Properties][app]}-2022.10.17"}}}}
[2022-10-17T22:31:53,726][ERROR][logstash.outputs.elasticsearch][lsn-ft] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"%{[Properties][app]}-2022.10.17", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x1c47a1c9>], :response=>{"index"=>{"_index"=>"%{[Properties][app]}-2022.10.17", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"invalid_index_name_exception", "reason"=>"Invalid index name [%{[Properties][app]}-2022.10.17], must be lowercase", "index_uuid"=>"_na_", "index"=>"%{[Properties][app]}-2022.10.17"}}}}
[2022-10-17T22:31:53,726][ERROR][logstash.outputs.elasticsearch][lsn-ft] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"%{[Properties][app]}-2022.10.17", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x5a633a56>], :response=>{"index"=>{"_index"=>"%{[Properties][app]}-2022.10.17", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"invalid_index_name_exception", "reason"=>"Invalid index name [%{[Properties][app]}-2022.10.17], must be lowercase", "index_uuid"=>"_na_", "index"=>"%{[Properties][app]}-2022.10.17"}}}}
[2022-10-17T22:31:53,726][ERROR][logstash.outputs.elasticsearch][lsn-ft] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"%{[Properties][app]}-2022.10.17", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x6002e645>], :response=>{"index"=>{"_index"=>"%{[Properties][app]}-2022.10.17", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"invalid_index_name_exception", "reason"=>"Invalid index name [%{[Properties][app]}-2022.10.17], must be lowercase", "index_uuid"=>"_na_", "index"=>"%{[Properties][app]}-2022.10.17"}}}}
.
.
.
Maybe mutate doesn't work with nested fields ?