# Postman data into http\_poller method

**URL:** https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690
**Category:** Logstash
**Created:** [July 26, 2018, 5:14am UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690 "2018-07-26T05:14:02Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [July 26, 2018, 5:14am UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/1 "2018-07-26T05:14:02Z")

</div>

Hi all,

We are working on fetching data from a monitoring tool into elastic search, the integration is possible through postman wherein i'll pass user credentials and a service tag to get the output.

Is there a way in logstash where i can pass on this information and get the output in elasticsearch.  
I knew we can pass user credentials in http\_poller method, but for passing an additional input is there a way?

Thanks  
Gauti

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [July 28, 2018, 7:13pm UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/2 "2018-07-28T19:13:56Z")

</div>

What kind of "additional input"? What does the request you need to make look like?

---

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [July 30, 2018, 7:24am UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/3 "2018-07-30T07:24:48Z")

</div>

@magnusbaeck It is just a plain text, as soon as the config file hits the url it'll prompt for some input, so i had to pass those input values (for e.g. if i need to fetch data for servers i have to pass on server name)

the usual input of http poller config file is  
it hits the url first,  
then prompts for user credentilas  
then it passes on to the filters and output.

In my scenario after password i need to pass the input value (like: {"scop":"ServiceTag","scopvalue":"LAPTOP"}

Is there any possible way? please advice.

Thanks  
Gauti

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [July 30, 2018, 8:31pm UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/4 "2018-07-30T20:31:31Z")

</div>

Sorry, I don't understand what you're trying to do and in what way the http\_poller input comes up short. Are you describing the desired behavior of the input plugin (i.e. that it should prompt you for input)? That's not supported.

---

<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 30, 2018, 8:51pm UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/5 "2018-07-30T20:51:46Z")

</div>

How do you pass that input? Is it the request body on a POST?

---

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [July 31, 2018, 7:36am UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/6 "2018-07-31T07:36:04Z")

</div>

yeah @Badger it is in the request body.

Thanks  
Gauti

---

<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 31, 2018, 11:45am UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/7 "2018-07-31T11:45:30Z")

</div>

I believe the [http\_poller](https://github.com/logstash-plugins/logstash-input-http_poller) input and the [http\_client](https://github.com/logstash-plugins/logstash-mixin-http_client) mixin are wrappers around the [manticore](https://github.com/cheald/manticore) http client.

The plugin does not support it, but it could be modified to pass 'query' as part of the configuration to the manticore client, which it would use as a request body for a post. You would have to modify the code and build your own version of the client.

---

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [July 31, 2018, 1:00pm UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/8 "2018-07-31T13:00:06Z")

</div>

Thanks @Badger but that looks complicated, the other way what i'm thinking is when i do a curl i'm able to pass on the inputs and able to get the output what i'm expecting, is there a way where i can use curl to get this done?  
If yes, can u please guide me.

Thanks  
Gauti

---

<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 31, 2018, 1:35pm UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/9 "2018-07-31T13:35:59Z")

</div>

You might be able to get it working using an exec input that runs curl and reads the body from a file.

```
input { exec { command => "curl ... < body.txt" ... } }
```

---

<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 28, 2018, 1:36pm UTC](https://discuss.elastic.co/t/postman-data-into-http-poller-method/141690/10 "2018-08-28T13:36:00Z")

</div>

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