# Logstash HTTP output plugin not working

**URL:** <https://discuss.elastic.co/t/logstash-http-output-plugin-not-working/85269>\
**Category:** Logstash\
**Created:** [May 10, 2017, 2:44pm UTC](https://discuss.elastic.co/t/logstash-http-output-plugin-not-working/85269 "2017-05-10T14:44:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhivya](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@Dhivya](https://discuss.elastic.co/u/Dhivya)\
**Post date:** [May 10, 2017, 2:44pm UTC](https://discuss.elastic.co/t/logstash-http-output-plugin-not-working/85269/1 "2017-05-10T14:44:30Z")

</div>

Hi,

I'm trying to integrate Logstash with service-now to create an incident if some error occurs.  
I'm using http output plugin to call service-now REST API for creating incident.

I'm getting the following exception

ERROR logstash.outputs.http - [HTTP Output Failure] Could not fetch URL {:url=\>"[https://XXX.service-now.com/api/now/v1/table/incident](https://XXX.service-now.com/api/now/v1/table/incident)"  
:message=\>"Read timed out", :class=\>"Manticore::SocketTimeout",

When I'm trying with REST client it works well. No issue with the input or API.  
If I don't give header with Auth I was getting 401 error response.

This is my logstash conf.

http {  
format=\>"message"  
http\_method=\>"post"  
content\_type =\> "application/json;charset=UTF-8"  
url=\> "[https://XXX.service-now.com/api/now/v1/table/incident](https://XXX.service-now.com/api/now/v1/table/incident)"  
**_headers =\> ["Authorization", "Basic ZWx1c3VhcmlvOnlsYWNsYXZl"]_**  
message=\>"{  
'u\_reported\_date':'%timestamp',   
'caller\_id':'Test User'  
'priority':'3',  
'short\_description':'Network exception',  
'description':'%message',  
'contact\_type':'email',  
'incident\_state':'1',  
'urgency':'3',  
'u\_categorization':'Core Team Category Depth 0',  
'company':'PRD Automation',  
'severity':'3',  
'location': 'DDC5C'  
}"   
}

**_How do I pass username / password for this http request?_** I suspect that's the problem...  
I'm very new to this. It might be a silly doubt.

Thanks in Advance,  
Dhivya

---

<div class="post-metadata">

**Author:** ![Dhivya](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@Dhivya](https://discuss.elastic.co/u/Dhivya)\
**Post date:** [May 10, 2017, 2:52pm UTC](https://discuss.elastic.co/t/logstash-http-output-plugin-not-working/85269/2 "2017-05-10T14:52:42Z")

</div>

I have also tried passing username and password in URI. Getting same exception!

[https://username:pwd@xxx.service-now.com/api/now/v1/table/incident](https://username:pwd@xxx.service-now.com/api/now/v1/table/incident)

---

<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:** [June 7, 2017, 2:53pm UTC](https://discuss.elastic.co/t/logstash-http-output-plugin-not-working/85269/3 "2017-06-07T14:53:36Z")

</div>

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