# Logstash http\_poller input from server with self-signed SSL certificate

**URL:** https://discuss.elastic.co/t/logstash-http-poller-input-from-server-with-self-signed-ssl-certificate/31407
**Category:** Logstash
**Created:** [September 30, 2015, 1:15pm UTC](https://discuss.elastic.co/t/logstash-http-poller-input-from-server-with-self-signed-ssl-certificate/31407 "2015-09-30T13:15:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![vikbon](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vikbon](https://discuss.elastic.co/u/vikbon)
#### Post date: [September 30, 2015, 1:15pm UTC](https://discuss.elastic.co/t/logstash-http-poller-input-from-server-with-self-signed-ssl-certificate/31407/1 "2015-09-30T13:15:00Z")

</div>

Hi All,

I’m new to Elasticsearch and attempting to configure logstash http\_poller input plugin to make api calls against a web server for performance data. Currently getting an “http\_request\_failure.error, handshake\_failure”. Any chance of someone providing an example configuration for using http\_poller plugin against a webserver with a self-signed certificate.

Thanks

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 30, 2015, 2:23pm UTC](https://discuss.elastic.co/t/logstash-http-poller-input-from-server-with-self-signed-ssl-certificate/31407/2 "2015-09-30T14:23:03Z")

</div>

What config do you have now?

---

<div class="post-metadata">

### Author: ![vikbon](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vikbon](https://discuss.elastic.co/u/vikbon)
#### Post date: [September 30, 2015, 5:58pm UTC](https://discuss.elastic.co/t/logstash-http-poller-input-from-server-with-self-signed-ssl-certificate/31407/3 "2015-09-30T17:58:10Z")

</div>

my current config is pasted below. thanks

input {  
http\_poller {  
urls =\> {  
test =\> {  
# Supports all options supported by ruby's Manticore HTTP client  
method =\> post  
url =\> "[https://lwl/lwl/api?json={"inspector"%3A"4"%2C"basis"%3A"machines"%2C"date"%3A"2%20hours"%2C"limit"%3A"0"}](https://lwl/lwl/api?json=%7B%22inspector%22%3A%224%22%2C%22basis%22%3A%22machines%22%2C%22date%22%3A%222%20hours%22%2C%22limit%22%3A%220%22%7D)"  
verify\_cert =\> true  
}  
}  
request\_timeout =\> 60  
interval =\> 60  
codec =\> "json"  
# A hash of request metadata info (timing, response headers, etc.) will be sent here  
metadata\_target =\> "http\_poller\_metadata"  
}

}

filter {

}

output {  
elasticsearch {  
protocol =\> "http"  
}  
}

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 30, 2015, 6:33pm UTC](https://discuss.elastic.co/t/logstash-http-poller-input-from-server-with-self-signed-ssl-certificate/31407/4 "2015-09-30T18:33:48Z")

</div>

Is the cert on the other end correct?

You can check with `openssl s_client -showcerts -connect hostname:9200`.

---

<div class="post-metadata">

### Author: ![vikbon](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vikbon](https://discuss.elastic.co/u/vikbon)
#### Post date: [September 30, 2015, 6:41pm UTC](https://discuss.elastic.co/t/logstash-http-poller-input-from-server-with-self-signed-ssl-certificate/31407/5 "2015-09-30T18:41:06Z")

</div>

Yes, the self-signed cert is on the remote server I'm attempting to poll data from.

---

<div class="post-metadata">

### Author: ![vikbon](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vikbon](https://discuss.elastic.co/u/vikbon)
#### Post date: [September 30, 2015, 7:34pm UTC](https://discuss.elastic.co/t/logstash-http-poller-input-from-server-with-self-signed-ssl-certificate/31407/6 "2015-09-30T19:34:01Z")

</div>

below is the result of the command openssl s\_client -showcerts -connect hostname:9200

![](https://us1.discourse-cdn.com/elastic/original/2X/f/f7dd38eb57cf5e3a7ac7d2b08d01b3e72f83becb.png)

I generated a certificate for the elasticsearch node using the following commands:  
_keytool -importcert -keystore c:\temp\labes01.jks -file c:\temp\prolab-ca.cer -alias prolab\_ca_

_keytool -genkey -alias labes01 -keystore c:\temp\labes01.jks -keyalg RSA -keysize 2048 -validity 712 -ext san=dns:labes01.prolab.inc,ip:10.143.0.217_

_keytool -certreq -alias labes01 -keystore c:\temp\labes01.jks -file c:\temp\labes01.csr -keyalg rsa -ext san=dns:labes01.prolab.inc,ip:10.143.0.217_

_keytool -importcert -keystore c:\temp\labes01.jks -file C:\temp\labes01-cert.cer -alias labes01_

I also followed instruction on this link to enable SSL on the node: [https://www.elastic.co/guide/en/shield/current/ssl-tls.html#installing-node-certificates](https://www.elastic.co/guide/en/shield/current/ssl-tls.html#installing-node-certificates)  
here is a screenshot of the elasticsearch configuration file where SSL is enabled  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/e/ec068a8f86b8d45f85bd7b762308c1d840cf190a.png)

---

<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: [July 6, 2017, 5:27am UTC](https://discuss.elastic.co/t/logstash-http-poller-input-from-server-with-self-signed-ssl-certificate/31407/7 "2017-07-06T05:27:36Z")

</div>


