I have figured out how to split the array into two events, or one of the items into the correct output if passed by itself, but I'm not sure how to both split the input array and then also split each item by actions.
The expected output would be that each of the 4 outputs above would be passed on as a log event.
I'd like logstash to listen for an http request with the array indicated as the JSON input above and then pass on the 4 output documents indicated above to Elasticsearch and to the filesystem. I think I've figured out the input/output steps work, but I'm not sure how to split the input twice. First to get one object for each member of the initial input array and then to split again on the "actions" property of each of those events.
Does that answer your question? Thanks for your help!
Thought you figured out the split already. The next part is to do the output to elasticsearch. Unless I don't understand your input correctly you should be almost done. Here is what I used to test.
I was getting an error when I tried something similar, but I must have made a silly mistake. I was also testing the split using stdin rather than generator - maybe that tripped me up?
Regarding the count => 1, does that send each element to the split one by one? Would I need anything like that if that input was sent via http or from a file rather than using the generator?
How can we rename actions to action as part of the split?
The count for the generator is how many time to repeat the message. It's used for testing. You wouldn't need that for HTT input. I would really focus on your input first because it's possible the data could be structured different.
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.