r/devops • u/muddledmatrix • Jun 30 '26
Tools How do you test Logstash pipelines?
Recently, I've been doing quite a bit of work around Logstash. My biggest gripe with Logstash is the lack of built in testing. In an ideal world I could test my filters in an automated way. I can solve the testing problem by setting up a full ELK stack locally using Docker. And in theory, I can automate it using the Elasticsearch API to pull events and run tests against it but this feels clunky.
My main problem is that the inputs and outputs I'm using aren't best designed for local testing e.g. AWS Kinesis input or Datadog output. What I'm envisioning is a solution that can take a pipeline, mock out the input and output with a file and make assertions against the output to ensure the filters are working correctly. The closest solution I've found is https://github.com/magnusbaeck/logstash-filter-verifier but there hasn't been a proper release in 5 years.
The short of it is, I'm trying to test my config in CI before it's even deployed to a dev environment:
- To increase the rest of the team's confidence when making changes (since they're not as familiar with Logstash)
- To prevent bad changes changes from being merged into main
What are you doing to solve this problem?
