Logstash Grok Pattern vs Python Regex?
问题 I am trying to configure logstash to manage my various log sources, one of which is Mongrel2. The format used by Mongrel2 is tnetstring , where a log message will take the form 86:9:localhost,12:192.168.33.1,5:57089#10:1411396297#3:GET,1:/,8:HTTP/1.1,3:200#6:145978#] I want to write my own grok patterns to extract certain fields from the above format. I started by testing my regex on the above message here, the regex is ^(?:[^:]*\:){2}([^,]*) this matches localhost . When I use the same regex