Hi,
I'm trying to parse xml files with the xpath plugin but it doesn't give me any result,
Here are my xml data and logstash conf.
<?xmlversion="1.0" encoding="utf-8"?>
<testResult>
<executionLog>
<numberOfTestCases>15</numberOfTestCases>
<numberOfTestCasesPassed>9</numberOfTestCasesPassed>
<numberOfTestCasesFailed>6</numberOfTestCasesFailed>
<numberOfTestCasesNotExecuted>0</numberOfTestCasesNotExecuted>
</executionLog>
</testResult>
input{
file{
path => "path"
start_position => "beginning"
exclude => "*.gz"
codec => multiline{
pattern => "<?xml version="1.0" encoding="utf-8"?>"
what => "next"
negate => true
max_lines => 5000000
}
}
}
filter{
xml{
remove_namespaces => "true"
source => "message"
xpath => ["testResult/executionLog/numberOfTestCases/text()","total"]
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "toscatest"
}
stdout { codec => rubydebug }
}
Is something wrong with my conf ?
Thanks for helping