Use another plugin in a custom filter plugin?


(Eric Thompson) #1

Hi All,
what is the best way to use other filter plugins in a custom plugin?

right now we have a bunch of ruby snippets in our configs that i'd like to leverage the plugin framework for testing, deployment, etc.

the ruby snippets are interleaved with several calls to the split filter and the xml filter.

what is the best way to use those plugins in my plugin?

i see two options:

  • install the plugin gems as deps of my plugin
    • instance the relevant classes of the plugin and call its methods
    • i'd have to figure out what all the required instance params are, etc
  • reimplement the plugins
    • they aren't all that complex

is there a better way? maybe i'm missing something about how plugins are implemented in logstash. maybe the calls to the plugins in a config file are just calls to helper methods/DSL methods that are implicitly created by the plugin api? if so maybe i can just call them using event.get['blah'] ?

thanks!


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.