# Http\_Polling and App-Keys

**URL:** <https://discuss.elastic.co/t/http-polling-and-app-keys/67362>\
**Category:** Logstash\
**Created:** [November 28, 2016, 2:46pm UTC](https://discuss.elastic.co/t/http-polling-and-app-keys/67362 "2016-11-28T14:46:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdamOlsson](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@AdamOlsson](https://discuss.elastic.co/u/AdamOlsson)\
**Post date:** [November 28, 2016, 2:46pm UTC](https://discuss.elastic.co/t/http-polling-and-app-keys/67362/1 "2016-11-28T14:46:50Z")

</div>

Hi!

I'm trying to setup Logstash to retrieve data from Pingdom. I have managed to connect to the Pingdom server but i need to add the application key that Pingdom provided me to the header. I can't figure out how or where to add the App-Key so i get access to Pingdom.

Here's my config file:

```
input {
  http_poller {
    urls => {
      pingdom => {
        method => get
        url => "https://api.pingdom.com/api/2.0/checks?limit=2"
        header => {
          Accept => "application/json"
        }
        auth =>{
          user => "username"
          password => "password"
        }
      }
    }
    interval => 1000
    request_timeout => 8
    metadata_target => http_poller_metadata
    tags => pingdom
  }
}
output {
  stdout { codec => rubydebug }
}

```

I've tried adding the App-Key inside the "header" bracket and inside the "auth" bracket with the keyword "App-Key", which is what the Pingdom API says it requires, but that only results in an error saying the config file is wrong.

I am new to all of Logstash, Kibana and ElasticSearch so this might just be a newbie mistake.

I am thankful for all answers!

---

<div class="post-metadata">

**Author:** ![andrewvc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewvc/32/5064_2.png) [@andrewvc](https://discuss.elastic.co/u/andrewvc)\
**Post date:** [November 28, 2016, 5:09pm UTC](https://discuss.elastic.co/t/http-polling-and-app-keys/67362/2 "2016-11-28T17:09:57Z")

</div>

You want `headers` not `header`.

---

<div class="post-metadata">

**Author:** ![AdamOlsson](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@AdamOlsson](https://discuss.elastic.co/u/AdamOlsson)\
**Post date:** [November 28, 2016, 6:55pm UTC](https://discuss.elastic.co/t/http-polling-and-app-keys/67362/3 "2016-11-28T18:55:46Z")

</div>

Thank you!

---

<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:** [December 26, 2016, 6:56pm UTC](https://discuss.elastic.co/t/http-polling-and-app-keys/67362/4 "2016-12-26T18:56:06Z")

</div>

Closed on December 26, 2016, 6:56pm UTC

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