The data in each event looks like this (paraphrased)
First event
Item.1234.pineapple.red
Item.1234.pegasus.purple.dogsled```
Second Event
```Item.5555.description
Item.5555.pineapple.red
Item.5555.pegasus.purple.dogsled```
I would like to get rid of this randomly generate number in the 2nd array slot.
In other words I want the results of each event to look like this
```Item.description
Item.pineapple.red
Item.pegasus.purple.dogsled```
I'm trying to use the ruby filter to do this, however it's not even close to working. Can anyone help me accomplish this task?
Is this right? the whole reason I ended up here was because the mutate/rename plugin wouldn't support wildcards and I have 50 fields in each event that I need to remove the random number from. I can't seem to figure out how to automate the whole process.
I tried using slice, but no matter what I do with slice it tells me
Ruby exception occurred: undefined method `slice!' for #<Hash
magnusblack
This is working properly, and I added some additional code (that I stole from another of your posts) that removes the old fields too. Here is the whole thing together.
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.