I am learning how to write my own custom filter plugin. Just started. I got the basics.
For my case, the input lines (or events) are like this
key1 = value1 key2 = value2 ... ====== key6 = value6 key7 = value7 ... ====== ...
where values can be anything, a number, a single word, a long string, ...
I would like to get, and manipulate, the values for a list of provided keys.
My question is, what is the best way here for me to do the matching?
- should I just investigate how to do regular expressions in ruby?
- copy & paste from an existing plugin that does the same, or similar? If yes, which one would you recommend?
- can a plugin import classes and methods from other plugins? If yes, would be the best way to have my plugin to call, somehow, logstash-filter-grok and let it do it?
Any suggestion or tip is more than welcome.