Hello,
When I started to send data from logstash to elasticsearch the format was set to string for several inputs.
I'd like to change the format from string to integer, but it looks like it requires reindexing the whole stuff.
So I started to search how to reindex my logstash-* to logstashnew-* and change the format of some data from string to integer. (for the fields labelled "crsscore", "sentbyte", "rcvdbyte", "sentpkt" and "rcvdpkt").
All the examples I found so far use logstash with a single index.
Is it possible to process all indexes using a wildcard in the logstash input to be able to convert the format from string to integer when creating the new one ?
input {
elasticsearch {
hosts => "elasticsearch:9200"
index => "logstash-*"
size => 10
}
}
filter {
convert {
"sentbyte" =>"integer"
"sentpkt" =>"integer"
"rcvdbyte" =>"integer"
"rcvdpkt" =>"integer"
"crsscore" =>"integer"
}
}
output {
elasticsearch {
host => "elasticsearch.net"
port => 9200
protocol => "http"
manage_template => false
index => "logconvert-"
document_id => "%{id}"
workers => 1
}
}
Best regards.