Logstash config - elasticsearch to elasticsearch

Goodmorning everyone,
I need to know if there is a possibility to set elasticsearch as input (also as an output), parsing all the logs I had previously parsed with logstash.
For example:
I have parsed all my akamai logs with a logstash configuration. Now I need to reparse the same logs file changing index. For now I've configured my configuration file this way:

input {
elasticsearch {
hosts => ["http://192.168.1.3:9200/"]
user => "elastic"
password => "changeme"
index => "akamai_logs*"
query => '{ "query": { "match_all": {} } }'
size => 500
scroll => "5m"
docinfo => true
}
}
output {
elasticsearch {
hosts => ["http://192.168.1.3:9200/"]
user => "elastic"
password => "changeme"
index => "newindex"
}
stdout { codec => rubydebug }
}

What am I doing wrong?

Thanks for the support!

Have you considered using the reindex API to reindex from remote?

Yes, but for my purpose it's not the best solution. Because in the near future I need to parse elasticsearch logs indexed by Graylog.

I don't have any experience with Graylog. Why would that data pose a problem?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.