# Metric Beat Search Guard Elastic Question

**URL:** <https://forum.search-guard.com/t/metric-beat-search-guard-elastic-question/824>\
**Category:** Search Guard\
**Created:** [March 1, 2018, 6:22pm UTC](https://forum.search-guard.com/t/metric-beat-search-guard-elastic-question/824 "2018-03-01T18:22:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanket\_jain](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@sanket\_jain](https://forum.search-guard.com/u/sanket_jain)\
**Post date:** [March 1, 2018, 6:22pm UTC](https://forum.search-guard.com/t/metric-beat-search-guard-elastic-question/824/1 "2018-03-01T18:22:23Z")

</div>

Hi all,

i have elastic search 6.1.2

Metricbeat 6.1.2 as well

i am trying to send data from metricbeat =\> elastic coordinator

I am stuck in the certificates loop in metricbeat

output.elasticsearch:

# Array of hosts to connect to.

hosts: [“10.16.11.172:9200”]

index: “metricbeat-ocean-qa-%{[beat.version]}-%{+yyyy.MM.dd}”

# Optional protocol and basic auth credentials.

protocol: “https”

username: “admin”

password: “admin”

**ssl.certificate\_authorities: [“/etc/metricbeat/root-ca.pem”]**

**ssl.certificate: “/etc/metricbeat/esnode.pem”**

**ssl.key: “/etc/metricbeat/key.pem”**

I tool the root-ca.pem from coordinator and placed it in metricbeat server

Similarly esnode.pem, key.pem

Now, after doing this, i get error

2018-03-01T18:21:12Z INFO Loading of config files completed.

2018-03-01T18:21:14Z ERR Failed to connect: Get [https://10.16.11.172:9200](https://10.16.11.172:9200): x509: certificate is valid for 127.0.0.1, not 10.16.11.172

2018-03-01T18:21:16Z ERR Failed to connect: Get [https://10.16.11.172:9200](https://10.16.11.172:9200): x509: certificate is valid for 127.0.0.1, not 10.16.11.172

I can clearly see 2 things

a. The certificates are wrong, and i am not sure how to fix this

b. Is there any option to bypass certificates check ?

---

<div class="post-metadata">

**Author:** ![lmjoebju](https://avatars.discourse-cdn.com/v4/letter/l/8797f3/32.png) [@lmjoebju](https://forum.search-guard.com/u/lmjoebju)\
**Post date:** [March 2, 2018, 8:41am UTC](https://forum.search-guard.com/t/metric-beat-search-guard-elastic-question/824/2 "2018-03-02T08:41:36Z")

</div>

You’re trying to present metricbeat as an Elasticsearch node with that certificate.  
Beats don’t need a certificate unless you want them to, in which case you’ll need to make a client certificate.

Else they’re just considered to be any regular user so connecting over https to your elasticsearch cluster will be enough.

> **···**
>
> On Thursday, March 1, 2018 at 7:22:24 PM UTC+1, sanket jain wrote:
> 
> > Hi all,
> 
> > i have elastic search 6.1.2
> 
> > Metricbeat 6.1.2 as well
> 
> > 
> 
> > i am trying to send data from metricbeat =\> elastic coordinator
> 
> > 
> 
> > I am stuck in the certificates loop in metricbeat
> 
> > 
> 
> > output.elasticsearch:
> 
> > # Array of hosts to connect to.
> 
> > hosts: [“[10.16.11.172:9200](http://10.16.11.172:9200)”]
> 
> > index: “metricbeat-ocean-qa-%{[beat.version]}-%{+yyyy.MM.dd}”
> 
> > # Optional protocol and basic auth credentials.
> 
> > protocol: “https”
> 
> > username: “admin”
> 
> > password: “admin”
> 
> > **ssl.certificate\_authorities: [“/etc/metricbeat/root-ca.pem”]**
> 
> > **ssl.certificate: “/etc/metricbeat/esnode.pem”**
> 
> > **ssl.key: “/etc/metricbeat/key.pem”**
> 
> > 
> 
> > I tool the root-ca.pem from coordinator and placed it in metricbeat server
> 
> > Similarly esnode.pem, key.pem
> 
> > 
> 
> > Now, after doing this, i get error
> 
> > 
> 
> > 2018-03-01T18:21:12Z INFO Loading of config files completed.
> 
> > 2018-03-01T18:21:14Z ERR Failed to connect: Get [https://10.16.11.172:9200](https://10.16.11.172:9200): x509: certificate is valid for 127.0.0.1, not 10.16.11.172
> 
> > 2018-03-01T18:21:16Z ERR Failed to connect: Get [https://10.16.11.172:9200](https://10.16.11.172:9200): x509: certificate is valid for 127.0.0.1, not 10.16.11.172
> 
> > 
> 
> > I can clearly see 2 things
> 
> > 
> 
> > a. The certificates are wrong, and i am not sure how to fix this
> 
> > b. Is there any option to bypass certificates check ?

---

<div class="post-metadata">

**Author:** ![sanket\_jain](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@sanket\_jain](https://forum.search-guard.com/u/sanket_jain)\
**Post date:** [March 2, 2018, 9:56am UTC](https://forum.search-guard.com/t/metric-beat-search-guard-elastic-question/824/3 "2018-03-02T09:56:34Z")

</div>

Thank you for the reply  
I was able to bypass SSL, using a config setting

SSL\_verification\_none

output.elasticsearch:  
&nbsp;&nbsp;# Array of hosts to connect to.  
&nbsp;&nbsp;hosts: ["10.12.3.186:9200"]  
&nbsp;&nbsp;ssl.verification\_mode: none  
&nbsp;&nbsp;index: "metricbeat-gxi-sj-%{[beat.version]}-%{+yyyy.MM.dd}"

&nbsp;&nbsp;# Optional protocol and basic auth credentials.  
&nbsp;&nbsp;protocol: "https"  
&nbsp;&nbsp;username: "admin"  
&nbsp;&nbsp;password: "admin"
