magnusbaeck / logstash-filter-verifier

Apache License 2.0
192 stars 27 forks source link

Specify stdin for either test argument, or logstash config argument. #50

Open fdask opened 7 years ago

fdask commented 7 years ago

It would be nice if for either of the main arguments to logstash-filter-verifier (either the logstash config one, or the test case), if we could use a - to specify read the content from STDIN.

I've got a case where our logstash files are one single file, including input/filter/output blocks. Including the input block when passing to logstash-filter-verifier causes a giant error.. passing just the filter block, success. So rather than re-arranging our logstash configs, or using a tmp file, I thought it'd be nice to just be able to pipe logstash config data to the command via stdin!

Feasible?

fdask commented 7 years ago

Using /dev/stdin works, just thought having the - parameter is pretty standard!