Hi,
Im using http poller to get API data output to be ingested into elastic search. I'm not getting any error but the message field is empty.
My config file is
input {
stdin{}
http_poller {
urls => {
q1 => {
method => get
user => "xxxx"
password => "xxxxx"
url => "https://xxxxxx?SchemaName=Dialogs_ChatTranscript&sessionId=2c4679fc-1335-453f-a5be-3b6d93eb165"
headers => {
Accept => "application/json"
}
}
}
request_timeout => 60
schedule => { cron => "* * * * * UTC"}
codec => multiline {
pattern => "^{"
negate => "true"
what => "next"
}
metadata_target => "http_poller_metadata"
}
}
filter {
kv {
source => message
target => parsedjson
field_split => "\n"
value_split => ":\ "
}
}
output{
stdout {
codec => rubydebug
}
}
My output is:
[2020-03-30T19:04:11,102][INFO ][logstash.inputs.http_poller][main] Registering http_poller Input {:type=>nil, :schedule=>{"cron"=>"* * * * * UTC"}, :timeout=>nil}
[2020-03-30T19:04:11,320][INFO ][logstash.javapipeline ][main] Pipeline started {"pipeline.id"=>"main"}
The stdin plugin is now waiting for input:
[2020-03-30T19:04:11,631][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
C:/elastic_stack/logstash-7.6.0/vendor/bundle/jruby/2.5.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/cronline.rb:77: warning: constant ::Fixnum is deprecated
[2020-03-30T19:04:14,782][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
C:/elastic_stack/logstash-7.6.0/vendor/bundle/jruby/2.5.0/gems/awesome_print-1.7.0/lib/awesome_print/formatters/base_formatter.rb:31: warning: constant ::Fixnum is deprecated
{
"@version" => "1",
"message" => "\"\"",
"http_poller_metadata" => {
"code" => 200,
"name" => "q1",
"host" => "LE000217",
"request" => {
"auth" => {
"eager" => true,
"user" => "xxxx",
"pass" => "xxxxx"
},
"method" => "get",
"headers" => {
"Accept" => "application/json"
},
"url" => "https://xxxxxxxxxxx?SchemaName=Dialogs_ChatTranscript&sessionId=2c4679fc-1335-453f-a5be-3b6d93eb165"
},
"runtime_seconds" => 31.616,
"response_headers" => {
"expires" => "-1",
"x-aspnet-version" => "4.0.30319",
"pragma" => "no-cache",
"content-type" => "application/json; charset=utf-8",
"x-powered-by" => "ASP.NET",
"date" => "Mon, 30 Mar 2020 13:35:32 GMT",
"server" => "Microsoft-IIS/8.5",
"content-length" => "2",
"cache-control" => "no-cache"
},
"response_message" => "OK",
"times_retried" => 0
},
"@timestamp" => 2020-03-30T13:35:31.952Z
}
Please help me to get the api output in elastic search