I am planning to use ILM in logstash. And there is a note saying : You cannot use dynamic variable substitution when ilm_enabled
is true
and when using ilm_rollover_alias
.
At the same time this is also there:
In order to minimize the number of open connections to Elasticsearch, maximize the bulk size and reduce the number of "small" bulk requests (which could easily fill up the queue), it is usually more efficient to have a single Elasticsearch output.
I am planning to run logstash on http input and the clients will send data there. In logstash I will add tag to the events to classify the sources they are coming from.
I want to have the best of both the worlds, e.g. ILM as well as the efficiency of a single Elasticsearch Output. I am thinking of a config like below.
output
{
if "project_one" in [tags]
{
elasticsearch
{
ilm_enabled => "true"
ilm_rollover_alias => "projectone"
ilm_pattern => "000001"
ilm_policy => "project_one"
hosts => "blah"
user => 'tony'
password => 'stark'
}
}
else if "project_two" in [tags]
{
elasticsearch
{
ilm_enabled => "true"
ilm_rollover_alias => "projecttwo"
ilm_pattern => "000001"
ilm_policy => "project_two"
hosts => "blah"
user => 'tony'
password => 'stark'
}
}
else
{
elasticsearch
{
ilm_enabled => "true"
ilm_rollover_alias => "projectthree"
ilm_pattern => "000001"
ilm_policy => "project_three"
hosts => "blah"
user => 'tony'
password => 'stark'
}
}
}
However I have a feeling that each
elasticsearch
{
}
counts as an output.
In later stage lots of clients will be sending data to logstash. Presistence in logstash will be configured.