# Filebeat output to secured HA Elasticsearch

**URL:** <https://discuss.elastic.co/t/filebeat-output-to-secured-ha-elasticsearch/267702>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 18, 2021, 4:54pm UTC](https://discuss.elastic.co/t/filebeat-output-to-secured-ha-elasticsearch/267702 "2021-03-18T16:54:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Angel\_Morena\_Si](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jose_angel_morena_si/32/76522_2.png) [@Jose\_Angel\_Morena\_Si](https://discuss.elastic.co/u/Jose_Angel_Morena_Si)\
**Post date:** [March 18, 2021, 4:54pm UTC](https://discuss.elastic.co/t/filebeat-output-to-secured-ha-elasticsearch/267702/1 "2021-03-18T16:54:23Z")

</div>

Hello there,

I have successfully deployed an HA Elasticsearch cluster which is has xpack security features enabled. My problem is that I do not really know how to configure filebeat elasticsearch.output, so it can do petitions to the different hosts of the Elasticsearch clusters. Specifically what worries me is the following:  
I know I can use the following configuration in the beat:

```auto
     output.elasticsearch:
        hosts: ["https://es1:9200","https://es2:9200","https://es3:9200"]
        protocol: "https"
        username: "xxx"
        password: "xxx"
        ssl.certificate_authorities: ["/etc/metricbeat/certs/ca.crt"]
        ssl.certificate: "/etc/metricbeat/certs/{{ es_node_name }}.crt"
        ssl.key: "/etc/metricbeat/certs/{{ es_node_name }}.key"

```

Each Elasticsearch node has its own certificate, if I declare three hosts "es1", "es2", and "es3", then the beat is going to need three different certificates to call each API of each node. But apparently, I can only specify only one certificate and one key. What can I do if I want the beats to call the three APIs and "balance" the petitions without using a reverse proxy?

Kind regards,

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [March 18, 2021, 7:47pm UTC](https://discuss.elastic.co/t/filebeat-output-to-secured-ha-elasticsearch/267702/2 "2021-03-18T19:47:39Z")

</div>

Does this blog post help? [Configuring SSL, TLS, and HTTPS to secure Elasticsearch, Kibana, Beats, and Logstash | Elastic Blog](https://www.elastic.co/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash)

Shaunak

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 15, 2021, 9:48pm UTC](https://discuss.elastic.co/t/filebeat-output-to-secured-ha-elasticsearch/267702/3 "2021-04-15T21:48:27Z")

</div>

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