There is no support for functions / routines as such. I split various filters into separate files in order to maintain logical separation and avoid creating giant files. I also have inputs and outputs in different files. This way I can combine all filters with debug I / O, e.g.
input { stdin {} } output { stdout { codec => rubydebug } }
and manually call Logstash to check the results of this input. Since I use filter ordering issues, I use the fact that Logstash reads configuration files in alphabetical order, so the files are called NN-some-descriptive-name.conf, where NN is an integer.
I also wrote a script that automates this process, allowing you to write a specification with test inputs and expected result messages, and if there is a mismatch, this will lead to an error and display diff. I can open the source code.
For deployment, use any configuration management system, such as Puppet, Chef, SaltStack, Ansible, CFEngine, or similar, that you are familiar with. I am very pleased with Ansible.
source share