# How to reference http poller data

**URL:** https://discuss.elastic.co/t/how-to-reference-http-poller-data/210915
**Category:** Logstash
**Created:** [December 6, 2019, 4:00pm UTC](https://discuss.elastic.co/t/how-to-reference-http-poller-data/210915 "2019-12-06T16:00:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![raged](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raged/32/45722_2.png) [@raged](https://discuss.elastic.co/u/raged)
#### Post date: [December 6, 2019, 4:00pm UTC](https://discuss.elastic.co/t/how-to-reference-http-poller-data/210915/1 "2019-12-06T16:00:05Z")

</div>

I have logstash rigged up for two inputs, one for beats and the other for an http poller to further enrich beats data.

How do I reference the data that comes from the http\_poller input?

Here is my config for the inputs:

```
input {
	beats {
		port => 5044
		client_inactivity_timeout => 300
	}

http_poller {
  urls => {
    igridurl => {
      method => get
      user => "usr"
      password => "pass"
      url => "myurl"
      headers => {
        Accept => "application/json"
      }      
      }
  }
  request_timeout => 60
  schedule => {every => "3h"}
  codec => "json"
  metadata_target => "http_poller_metadata"
}

}

```

I have tried to add a field by using:

```
mutate {
 add_field => {"HTTP_DATA" => "%{[http_poller_metadata]}"}
}

```

But that doesn't work, I literally get a field with `"%{[http_poller_metadata]}"` as the value...

---

<div class="post-metadata">

### Author: ![raged](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raged/32/45722_2.png) [@raged](https://discuss.elastic.co/u/raged)
#### Post date: [December 9, 2019, 1:51pm UTC](https://discuss.elastic.co/t/how-to-reference-http-poller-data/210915/2 "2019-12-09T13:51:08Z")

</div>

I see one way of getting the data is to use a elasticsearch filter within logstash. Not really what I want to do, I was expecting to reference the data like I would when I use a jdbc\_static filter which references the data in memory.

I needed to actually add fields like:

`fields => { "@timestamp" => "started" }`

I also need to add:  
`result_size => 40` as the default is 1.

It adds all results as an array

---

<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: [January 6, 2020, 1:51pm UTC](https://discuss.elastic.co/t/how-to-reference-http-poller-data/210915/3 "2020-01-06T13:51:11Z")

</div>

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