Hi,
I am using the http plugin in my logstash.conf file, where I am getting a XML document. I have to extract a tag from the XML document and make it as a field in elastic search. I am not getting any errors but the filed is not getting created when I see the kibana dashboard.
Logstash.config
Input {
http {
host => "0.0.0.0"
port => "8080"
}
}
filter {
xml {
source => "message"
store_xml => false
remove_namespaces => true
xpath =>[ "/Document/student/id", "studentID"]
}
}
output {
stdout { codec => rubydebug }
elasticsearch{
hosts => ["localhost:9200"]
index => "document"
type => "patients"
}
}
xml Input
<?xml version="1.0" encoding="UTF-8"?>
<Document>
<student>
<id>1234567</id>
</student>
<recordTarget>
<role>
.....
...... have multiple internal tags....
</role>
</recordTarget>
</Document>
Can you please point out what is the mistake I am doing here. Thanks in advance