Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 891 Bytes

README.md

File metadata and controls

31 lines (18 loc) · 891 Bytes

Filebeat Multi-line Tester

Description

A small Go application to test a multi-line regex to be used with the filebeat multiline config option

Building application

Run make build in the root of this application repository.

Usage

  • -f : File containing multi-line string to test (default: "")
  • -n : Negate the pattern matching (default: true)
  • -p : Multi-line regex pattern to use for the matching (default: "")
  • -y : Specify a filebeat prospector yaml config, which overrides the -f, -n, and -p flags (default: "")
  • -v : Prints current version and exits

Example

./multiline-test -p "^=[A-Z]+|^$" -f teststring.txt

Credits

This code base is a adaptation of the code sample which Elastic provides as a testing mechanism within the Go Playground.

https://play.golang.org/p/uAd5XHxscu

License

Coverted under the MIT license.