Hi,
I have problem with dropping events on condition that one of fields has specific value set. Fields is extracted using xml filter plugin.
According to below my understanding is all events except of those with xmlRequestType = "CreateRQ" or xmlRequestType = "CreateRS" should be dropped. So below example with CreateRQ should store value, but it doesn't.
Part of my filter section config:
## parsing XML payload
if [xmlPayload] {
xml {
source => "xmlPayload"
store_xml => false # disable storing parsed xml
remove_namespaces => true
xpath => {
"local-name(/*)" => "xmlRequestType"
"(//@ClientCode)[1]" => "xmlClientCode"
"(//@ClientContextCode)[1]" => "xmlClientContextCode"
}
}
}
# drop anything except of CreateRQ/CreateRS
if [xmlRequestType] not in "[CreateRQ","CreateRS"] {
drop{}
}
and rubydebug output when above condition is commented
{
"xmlRequestType" => [
[0] CreateRQ"
],
"path" => "/apps/elk/logstash/pdc.log",
"xmlClientContextCode" => [
[0] "GCL"
],
"xmlClientCode" => [
[0] "TN"
],
"@version" => "1",
"@timestamp" => 2018-09-21T12:27:37.020Z
}
Thanks in advance !