The json structure shows an array of servers and their objID. I would like to create a Ruby filter so that whenever the active field is false, the objID field will be set to an empty string. Below is my Ruby filter however it doesn't work since I am not familiar with Ruby....
a = event.get('[server]')
a.each_index { |i|
if a[i]["active"] == "false"
event.set(a[i]["objID"], "")
end
}
Any help would be appreciated! Thank you in advance.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.