I am new to elasticsearch and am trying to figure out index management. I index smallish documents continuously for a week. I would like the index names to include the date in their name along with a project specifier i.e.
foobar-yyyy-mm-dd
It doesn't appear to be a simple thing to do. Is this accomplished by using a template for foobar indexes and then alias all foobar indices to some umbrella term for searching? If this is correct than I assume I use curator to prune?
I just want to make sure I am not over complicating an otherwise simple thing.
Hrm. That seems strange but remember I am new to elasticsearch. Can you give me a couple bread crumbs to follow? I use the java RestHighLevelClient to index. How do you "put" everything through logstash?
Adding Logstash to the mix is of course one more service to worry about. What you get is a service that can talk fluently with Elasticsearch, can load balance over several ES nodes and it will create and name the ES indices for you. You can also do more advanced stuff like enrich your logs as well.
As you are shipping directly to Elasticsearch your data has to be in JSON.
To run Logstash, configure a TCP or UDP input that accepts JSON. From the TCP input plugin docs
I'd not use logstash when the source of data is available from a Java application.
The index name is something you can easily compute in Java. There's no need IMO to add logstash.
But may be I'm missing something. What kind of data are you indexing @gormanst?
That's kind of where my original question was headed. I just wanted to make sure I was not overly complicating things. So I should create a template with an alias (for searching) and programatically figure out that I want to index to foobar-yyyy-mm-dd. Finally, use Curator to prune off old data?
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.