Is there any way to write loops inside output of Logstash
For a certain message
"total:100 name:product 1"
I can parse total
from this message and want to send 100 times to elasticsearch My code is just pseudocode, is there any way to implement this?
filter {
grok {
match => { "message" => "%{total:total} (?m)%{name:name}" }
}
}
output {
while count<=time do
elasticsearch {
hosts => ["localhost:9200"]
index => "data-test"
user => "elastic"
password => "changeme"
}
end
}