Hi all,
I have an elasticsearch cluster with 3 nodes.
is a really basic cluster. On each node i have one logstash pointing to cluster nodes.
If a node go down all logstash output fail, even if i have the master node up.
how can i avoid data loss in this specific case?
I know i can remove the host from "hosts" output, but i'm wondering if there is a way logstash can know who is the master and send messages only to it.
Thanks
my ooutput config looks like this:
output {
elasticsearch {
hosts => ["elastic1:9200", "elastic2:9200", "elastic3:9200"]
index => "syslog-%{+YYYY.MM.dd}"
user => "logstash_internal"
password => "password"
}
My error log looks like this:
[2020-09-03T17:32:54,192][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logstash_internal:xxxxxx@elastic2:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_internal:xxxxxx@elastic2:9200/][Manticore::SocketException] No route to host (Host unreachable)"}
[2020-09-03T17:33:01,206][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logstash_internal:xxxxxx@elastic2:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_internal:xxxxxx@elastic2:9200/][Manticore::SocketException] No route to host (Host unreachable)"}
[2020-09-03T17:33:04,212][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logstash_internal:xxxxxx@elastic2:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_internal:xxxxxx@elastic2:9200/][Manticore::SocketException] No route to host (Host unreachable)"}
[2020-09-03T17:33:11,224][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logstash_internal:xxxxxx@elastic2:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_internal:xxxxxx@elastic2:9200/][Manticore::SocketException] No route to host (Host unreachable)"}
[2020-09-03T17:33:14,229][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logstash_internal:xxxxxx@elastic2:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_internal:xxxxxx@elastic2:9200/][Manticore::SocketException] No route to host (Host unreachable)"}
[2020-09-03T17:33:21,242][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logstash_internal:xxxxxx@elastic2:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_internal:xxxxxx@elastic2:9200/][Manticore::SocketException] No route to host (Host unreachable)"}
[2020-09-03T17:33:24,247][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logstash_internal:xxxxxx@elastic2:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_internal:xxxxxx@elastic2:9200/][Manticore::SocketException] No route to host (Host unreachable)"}