# Help with HTTP\_Poller

**URL:** https://discuss.elastic.co/t/help-with-http-poller/35871
**Category:** Logstash
**Created:** [November 30, 2015, 9:07am UTC](https://discuss.elastic.co/t/help-with-http-poller/35871 "2015-11-30T09:07:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Tal\_Bar\_Or](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tal_bar_or/32/5127_2.png) [@Tal\_Bar\_Or](https://discuss.elastic.co/u/Tal_Bar_Or)
#### Post date: [November 30, 2015, 9:07am UTC](https://discuss.elastic.co/t/help-with-http-poller/35871/1 "2015-11-30T09:07:03Z")

</div>

Hi All,

I am trying to pull out from rest API using http\_poller data that should eventually presented in Kibana.  
When i am using curl i have successful results show below , in other hand when using Http\_Poller with config input/output config file show below I get error showed below ,i assume that something i set on the config file is wrong , any idea how to make it works ?  
Please advice  
Thanks

**Http\_Poller resaults**  
\> {  
\> "\_index": "logstash-2015.11.30",  
\> "\_type": "logs",  
\> "_id": "AVFX-cv8Lz8kppFK0E2_",  
\> "\_score": null,  
\> "\_source": {  
\> "@version": "1",  
\> "@timestamp": "2015-11-30T10:39:26.430Z",  
\> "http\_poller\_metadata": {  
\> "name": "test2",  
\> "host": "0.0.0.0",  
\> "request": {  
\> "headers": {  
\> "Accept": "application/json"  
\> },  
\> "auth": {  
\> "user": "root",  
\> "pass": "58b52742c8f4819f"  
\> },  
\> "method": "get",  
\> "url": "[https://localhost:5665/v1/objects/services](https://localhost:5665/v1/objects/services)"  
\> },  
\> "runtime\_seconds": null  
\> },  
\> "tags": [  
\> "\_http\_request\_failure"  
\> ],  
\> "http\_request\_failure": {  
\> "request": {  
\> "headers": {  
\> "Accept": "application/json"  
\> },  
\> "auth": {  
\> "user": "root",  
\> "pass": "password"  
\> },  
\> "method": "get",  
\> "url": "[https://localhost:5665/v1/objects/services](https://localhost:5665/v1/objects/services)"  
\> },  
\> "name": "test2",  
\> "error": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",  
\> "backtrace": null,  
\> "runtime\_seconds": 0.008  
\> }  
\> },  
\> "fields": {  
\> "@timestamp": [  
\> 1448879966430  
\> ]  
\> },  
\> "sort": [  
\> 1448879966430  
\> ]  
\> }

**Config file**

> input {  
> http\_poller {  
> urls =\> {  
> test1 =\> "[https://localhost:5665](https://localhost:5665)"  
> test2 =\> {  
> # Supports all options supported by ruby's Manticore HTTP client  
> method =\> get  
> url =\> "[https://localhost:5665/v1/objects/services](https://localhost:5665/v1/objects/services)"  
> headers =\> {  
> Accept =\> "application/json"  
> }  
> auth =\> {  
> user =\> "root"  
> password =\> "password"  
> }
> 
> }  
> }

> request\_timeout =\> 60  
> interval =\> 60  
> codec =\> "json"  
> ssl\_certificate\_validation =\> "false"
> 
> # A hash of request metadata info (timing, response headers, etc.) will be sent here
> 
> metadata\_target =\> "http\_poller\_metadata"  
> }  
> }

> ```
> output {
> 
> ```
> 
> elasticsearch { hosts =\> ["localhost:9200"] }  
> stdout {  
> codec =\> rubydebug  
> }  
> }

\*\*Curl resaults \*\*  
`curl -k -s -u root:password 'https://localhost:5665/v1/objects/services'`

> ```
> {"results":[{"attrs":{"__name":"UCS-SRV2!StressTestAgent_7","acknowledgement":0.0,"acknowledgement_expiry":0.0,"action_url":"","active":true,"check_attempt":1.0,"check_command
> ":"nrpe","check_interval":60.0,"display_name":"StressTestAgent_7","enable_active_checks":true,"enable_event_handler":true,"enable_flapping":false,"enable_notifications":true,"
> enable_passive_checks":true,"enable_perfdata":true,"flapping":false,"flapping_last_change":1448873198.7643620968,"flapping_negative":2612.0,"flapping_positive":238.0,"flapping
> _threshold":30.0,"force_next_check":false,"force_next_notification":false,"groups":["StressTestAgent"],"ha_mode":0.0,"host_name":"UCS-SRV2","icon_image":"","icon_image_alt":""
> ,"last_check":1448873198.7643170357,"last_check_result":{"active":true,"check_source":"sr-demo-mon","command":["/usr/lib/nagios/plugins/check_nrpe","-H","UCS-SRV2","-c","proce
> ssmetrics","-a","-n ProdLive_01_Nov_15-StressTestAgent_7@UCS-SRV2 -w @75:80 -c @80: -u http://172.18.4.110:10101/DaletIcinga/getDaletMetrics?from=ProdLive_01_Nov_15-StressTest
> Agent_7@UCS-SRV2"],"execution_end":1448873198.7642290592,"execution_start":1448873188.7606370449,"exit_status":2.0,"output":"CHECK_NRPE: Socket timeout after 10 seconds.","per
> formance_data":[],"schedule_end":1448873198.7643170357,"schedule_start":1448873248.7599999905,"state":2.0,"type":"CheckResult","vars_after":{"attempt":1.0,"reachable":false,"s
> tate":2.0,"state_type":1.0},"vars_before":{"attempt":1.0,"reachable":false,"state":2.0,"state_type":1.0}},"last_hard_state":2.0,"last_hard_state_change":1448872718.764029026,"
> last_in_downtime":false,"last_reachable":false,"last_state":2.0,"last_state_change":1448872718.764029026,"last_state_critical":1448873198.7643458843,"last_state_ok":0.0,"last_
> state_type":1.0,"last_state_unknown":0.0,"last_state_unreachable":1448873198.7643489838,"last_state_warning":1448872653.3633179665,"max_check_attempts":5.0,"name":"StressTestA
> 
> ```

---

<div class="post-metadata">

### Author: ![abdalians](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@abdalians](https://discuss.elastic.co/u/abdalians)
#### Post date: [May 11, 2016, 3:48am UTC](https://discuss.elastic.co/t/help-with-http-poller/35871/2 "2016-05-11T03:48:24Z")

</div>

Hi did you find a solution to this problem?

---

<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: [July 6, 2017, 4:58am UTC](https://discuss.elastic.co/t/help-with-http-poller/35871/3 "2017-07-06T04:58:14Z")

</div>


