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"
: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"
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