Logstash HTTP output plugin not working


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"
: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 {
content_type => "application/json;charset=UTF-8"
url=> "https://XXX.service-now.com/api/now/v1/table/incident"
headers => ["Authorization", "Basic ZWx1c3VhcmlvOnlsYWNsYXZl"]
'caller_id':'Test User'
'short_description':'Network exception',
'u_categorization':'Core Team Category Depth 0',
'company':'PRD Automation',
'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,

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


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