# Logstash http\_poller POST Syntax

**URL:** https://discuss.elastic.co/t/logstash-http-poller-post-syntax/51674
**Category:** Logstash
**Created:** [June 2, 2016, 11:32am UTC](https://discuss.elastic.co/t/logstash-http-poller-post-syntax/51674 "2016-06-02T11:32:03Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![PhaedrusTheGreek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phaedrusthegreek/32/4884_2.png) [@PhaedrusTheGreek](https://discuss.elastic.co/u/PhaedrusTheGreek)
#### Post date: [November 18, 2016, 7:39pm UTC](https://discuss.elastic.co/t/logstash-http-poller-post-syntax/51674/2 "2016-11-18T19:39:45Z")

</div>

Logstash http\_poller input supports any [Manticore Client options](http://www.rubydoc.info/github/cheald/manticore/Manticore%2FClient%3Apost).

Example:

```auto
input {
 # To improve performance, search only today and yesterday's index
 # Percent Encoded: "<.monitoring-es-2-{now%2Fd}>,<.monitoring-es-2-{now-1d}>/_search"
 # See https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html
 http_poller {
  urls => {
   my_es_cluster => {
    method => post
    url => "http://localhost:9200/%3C.monitoring-es-2-%7Bnow%2Fd%7D%3E,%3C.monitoring-es-2-%7Bnow-1d%7D%3E/_search"
    body => '{ "query": { "range": { "timestamp": { "gt": "now-1h" } } } }'
    headers => {
     Accept => "application/json"
    }
    auth => {
          user => "elastic"
          password => "changeme"
        }
   }
  }
  request_timeout => 60
  interval => 60
 }
}

output {
 stdout { codec => rubydebug }
}

```

---

_[View the full topic](https://discuss.elastic.co/t/logstash-http-poller-post-syntax/51674)._
