Hello team,
I wanted to drop all fields which containaing PublicKey word in the field name.
date=2019-05-10 time=11:37:47 PublicKey="abc" type.PublicKey="xyz" PublicKey.subtype="pqr" level="notice" vd="vdom1" eventtime=1557513467369913239
I want to drop all fields which contains PublicKey.
I have tried below Ruby code but it is not working:
ruby {
code => '
event.to_hash.keys.each { |k| event.remove(k) if k.include?("PublicKey") }
'
}
Also:
ruby {
code => '
event.to_hash.keys.each { |k|
if k.include?("PublicKey")
event.remove(k)
end
}
'
}