Skip to main content


Showing posts from January, 2017

Testing logstash filters

There are many posts on techniques for testing your logstash config, but I found most of them to lack in the exact details of getting it working and others are just obsolete, so here are my dumbed down notes:
download, unpack and cd into the logstash version you are using or planning to useinstall development tools: ./bin/logstash-plugin install --developmentcheck if the bin directory contains an rspec file. If not create it and make it executable using this sourcenow cd into the project holding your logstash configs. I'll assume your logstash config lives in a conf.d directory: create a spec directory at the same level or run ${LOGSTASH_HOME}/bin/rspec --init for rspec to create its directory structure. You should now have conf.d and spec at the same levelin spec drop a test specification, like the one belowtest your specs with the following command:${LOGSTASH_HOME}/bin/rspec
Enjoy :-)

Edited on Jan 29th 2017 as I missed the plugin step. Apparently I had an older version lying ar…