# Http poller with --insecure mode

**URL:** https://discuss.elastic.co/t/http-poller-with-insecure-mode/191121
**Category:** Logstash
**Created:** [July 18, 2019, 3:40am UTC](https://discuss.elastic.co/t/http-poller-with-insecure-mode/191121 "2019-07-18T03:40:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TsuWeiQuan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsuweiquan/32/46252_2.png) [@TsuWeiQuan](https://discuss.elastic.co/u/TsuWeiQuan)
#### Post date: [July 18, 2019, 3:40am UTC](https://discuss.elastic.co/t/http-poller-with-insecure-mode/191121/1 "2019-07-18T03:40:35Z")

</div>

Hello,

I am trying to get data from a salt server via RestAPI. I can curl the data with --insecure mode. However, it is using a self-signed cert and I am unable to get the webserver cert.

I would like to use http\_poller plugin to pull the data from the API periodically but i do not know how can i apply the --insecure mode in logstash.

Is there a way to allow http\_poller to allow --insecure pulling of data?

```
input {
  http_poller {
    urls => {
      saltserver => {
        method => get
        url => "https://sysauto.com.sg/api/host"
        headers => {
          Accept => "application/json"
        }
      }
    }
    request_timeout => 60
    schedule => { cron => "* * * * * UTC"}
    codec => "json"
    metadata_target => "http_poller_metadata"
  }
}

output {
  stdout {
    codec => rubydebug
  }
}

```

Currently i am receiving handshake error.  
`"error" => "handshake alert: unrecognized_name",`

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 18, 2019, 10:01am UTC](https://discuss.elastic.co/t/http-poller-with-insecure-mode/191121/2 "2019-07-18T10:01:12Z")

</div>

> [@TsuWeiQuan](#):
>
> However, it is using a self-signed cert and I am unable to get the webserver cert.

If you have a common cipher you can get the certificiate. Presenting the certificate is step 2 in TLS negotiation. You do not need to be able to establish a TLS connection to get the cert. The http\_poller documentation then covers what to do with a self-signed cert.

---

<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: [August 15, 2019, 10:01am UTC](https://discuss.elastic.co/t/http-poller-with-insecure-mode/191121/3 "2019-08-15T10:01:14Z")

</div>

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