Thanks again for another reply.
As i said, I'm able to parse the whole xml data now but there is one small problem.
When i run the command- logstash -f testxml.CONF, from the command line, i get following lines.
D:\logstash-5.6.3\bin>logstash -f testxml.CONF
Picked up _JAVA_OPTIONS: -Xmx512M -Xms256M
Sending Logstash's logs to D:/logstash-5.6.3/logs which is now configured via log4j2.properties
[2017-11-16T16:40:51,289][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"D:/logstash-5.6.3/modules/fb_apache/configuration"}
[2017-11-16T16:40:51,320][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"D:/logstash-5.6.3/modules/netflow/configuration"}
[2017-11-16T16:40:54,080][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://localhost:9200/]}}
[2017-11-16T16:40:54,080][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://localhost:9200/, :path=>"/"}
[2017-11-16T16:40:54,374][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://localhost:9200/"}
[2017-11-16T16:40:54,593][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2017-11-16T16:40:54,609][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-", "version"=>50001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"default"=>{"_all"=>{"enabled"=>true, "norms"=>false}, "dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date", "include_in_all"=>false}, "@version"=>{"type"=>"keyword", "include_in_all"=>false}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
[2017-11-16T16:40:54,609][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//localhost:9200"]}
[2017-11-16T16:40:57,090][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>500}
[2017-11-16T16:40:57,638][INFO ][logstash.pipeline ] Pipeline main started
[2017-11-16T16:40:57,851][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
But the screen stays there even though i have provided stdout in my conf file, the moment i press cntrl+c, the pipeline stops and only after that i get my output like below,
[2017-11-16T16:40:57,638][INFO ][logstash.pipeline ] Pipeline main started
[2017-11-16T16:40:57,851][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2017-11-16T16:43:48,191][WARN ][logstash.runner ] SIGINT received. Shutting down the agent.
[2017-11-16T16:43:48,206][WARN ][logstash.agent ] stopping pipeline {:id=>"main"}
{
"path" => "D:\check.xml",
"hostname" => "KHAN",
"@timestamp" => 2017-11-16T11:13:48.831Z,
"@version" => "1",
"host" => "01HW536446",
"message" => "\r\nKHAN\r",
"type" => "test-xml",
"tags" => [
[0] "multiline"
]
}
Terminate batch job (Y/N)? y
I need to know why the output is not coming before pressing cntrl+c.
Please help.