Transfer logstash data to elasticsearch through HA proxy

Hi there,
I have a logstash server, a elasticsearch server, a HA proxy server. I want to transfer data from LS to ES through HA proxy as flow:
LS(10.0.0.2) ------> HA proxy(172.0.0.2) -------> ES(192.168.56.2)
I just configed LS output as below:

output {
        elasticsearch {
                hosts => ["172.0.0.2:9200"]
                manage_template => false
                index => "test"
                document_type => "%{[@metadata][type]}"
         }
}

I got the index in ES server but there are no data belong to it. The result as below:

health status index               uuid                   pri rep docs.count docs.deleted store.size pri.store.size
red    open   test 				  d5KEDZdpSq2GsQ-D0KYneQ 5   1   <blank>    <blank>      <blank>    <blank>

So, how can i configure LS output to which ES can get data from LS through HA proxy?

Thanks.

Why is the health of the index red? Check your ES logs.

No special configuration should be necessary on the Logstash side. The whole point of HAproxy is to be a transparent proxy.

The log error as below:

[2017-11-02T17:59:07,703][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [CINFRA-els01] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/data/elasticsearch/CINFRA-els]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?

Well, that needs to be fixed. I suggest you consult the Elasticsearch group unless you can figure it out.

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