We have a cluster of 7 nodes which is growing up fastly. We want to find a way to "archive" some logs that we must keep (legal inquiries) for several years.
I would like to know if there is a solution / command / way to export old data in a text format?
I want to put those text files somewhere else.
A frozen index has almost no overhead on the cluster (except for maintaining its metadata in memory) and is read-only. Read-only indices are blocked for write operations, such as docs-index_ or force merges. That could be a solution
you can use logstash with elasticsearch as input with a your query and as output a file to which you can after archiving them wherever you want. (I imagine that these files can be reindexed).
input {
elasticsearch {
hosts => ["host:9200"]
index => "index-we-are-reading-froml"
query => '
{"query": {
..
#Insert your Elasticsearch query here
}
}
}
}}'
}
}
output {
# see documentation
file {
path => ...
codec => line { format => "custom format: %{message}"}
}
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.