XML Filter Not Working


#1

After adding the xml filter below, it's not doing anything. It just says that it successfully started. Help is much appreciated. Not sure what to do next...

[2017-07-19T16:50:54,105][INFO ][logstash.outputs.elasticsearch] New Elasticsear
ch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>[#<Java::JavaNet:
:URI:0x16c4d88>]}
[2017-07-19T16:50:56,660][INFO ][logstash.pipeline ] Starting pipeline {"
id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.
delay"=>5, "pipeline.max_inflight"=>125}
[2017-07-19T16:50:57,511][INFO ][logstash.pipeline ] Pipeline main starte
d
[2017-07-19T16:50:57,721][INFO ][logstash.agent ] Successfully started
Logstash API endpoint {:port=>9600}

filter {
xml {
source => "letter"
xpath => [
"/letter/title/text()", "letter",
"/letter/mainTerm/code/text()", "code",
"/letter/mainTerm/title/text()", "expression",
"/letter/mainTerm/title/nemod/text()", "nemod",
"/letter/mainTerm/seeAlso/text()", "seeAlso",
"/letter/mainTerm/term/title/text()", "termExpression",
"/letter/mainTerm/term/code/text()", "termCode",
"/letter/mainTerm/see/text()","see",
"/letter/mainTerm/term//term/text()","terms",
"/letter/mainTerm//term/text()","term",
"/letter/mainTerm/term/term/seecat/text()","seeCat",
"/letter/mainTerm/term/seeAlso/text()","termSeeAlso",
"/letter/mainTerm/manif/text()","manif"
]
store_xml => false
}
}


(Magnus B├Ąck) #2

The problem is most likely that your input plugin isn't emitting any events in the first place.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.